1029 Views
React hooks make it easy to add a single piece of state to a component. But it's also a breeze to write your very own custom hooks, just by moving the hooks-related code into a function. Say you need a boolean true/ false flag to keep track of whether a bit of spoiler text is shown or hidden.
0 comments