Getting more complicated with React HooksIn my last post [https://blog.rocketinsights.com/getting-hooked-on-react-hooks-2] I gave a brief overview of the many tools React Hooks provides which allow developers to create stateful functional components that can mimic the the lifecycle events of class components. Building off of this, I'd like to now give an example of a more complex piece of UI build entirely using React Hooks to demonstrate how React Hooks might look in more complicated components. The Component In a recent project we
Getting Hooked on React HooksReact Hooks have been available in a stable release since React 16.8 back in February. Hooks address a number of grievances that developers have with React by primarily achieving 2 things: 1. Removing the need for javascript classes and simplifying components 2. Allowing users to share stateful logic across multiple components [https://reactjs.org/docs/hooks-custom.html] In this article I would like to demonstrate how the introduction of React Hooks addresses that first task by convertin