🔥 Here's a mini crash course just for you! 🔥
(code links at the end)
#React #javascript
THREAD 👇
There are many other built in hooks, but they all follow similar patterns
Get the complete list here: reactjs.org/docs/hooks-ref…
That's it! You can now add state and long-running effects to function components.
Class components aren't dead, but hooks do help clean up some component logic.
Here are links to code you can try out!
useState
codesandbox.io/s/react-hooks-…
useEffect
codesandbox.io/s/react-hooks-…
Custom Hook
codesandbox.io/s/react-hooks-…