1.

What is HOC in React Native?

Answer»

Higher-Order-Component, shortly KNOWN as HOC is an advanced React Native technique to reuse the component LOGIC. The function obtains a component and returns a NEW element.

NOTE: If you are a react native DEVELOPER then these questions & answers will help you to crack your interview easily.

Example

function HOC(COMP) {
     return class NewComp extends Component {
         render() {
            return <comp>
         }
    }
}



Discussion

No Comment Found