Create a Flexible API by Using Custom React Hooks

Share this video with your friends

Send Tweet

The React hooks API allows us to build our own hooks using function composition, giving us the power to share logic and features in a simple way among different components. This also helps us expose a better API for the components we build, empowering the user to decide how to use and render the data without forcing them with styling or structure decisions shipped with the component. In this model, the component only encapsulates the required logic to work.