React Hooks props



Using Reacts Hooks for consuming context data

No doubt, code reuse between components is easier with Custom Hooks and also require less amount of code. They let you use state and other React features without writing a class. Hooks are a new addition in React 16.8. Code reuse with React Custom Hooks.
Next, we’ll learn how to consume context data with React Hooks instead of using render props pattern. The Effect Hook lets you perform side effects in function components: