Controlling component visibility with React Hooks

1 · Enda · April 22, 2019, midnight
With the release of React 16.8, Hooks are the newest addition to the world’s most popular front-end framework. Hooks give us access to state and other lifecycle events from functional components. Before now functional components were always stateless. To use state we had to write class components, which are more verbose and complex than their functional counterparts. In this guide we are going to make a simple component which will remain hidden until a button is clicked. We will also set a ti...