Creating a Custom Hook in React
• 6 min readReact.js is a popular JavaScript library for building user interfaces. It's been a while now when react introduced hooks to manage state and lifecycle in functional components. React provide various built-in hooks for different purposes. But we can also create our own custom hooks to encapsulate and reuse complex logic between components.