React Hooks

What is a Hook?

When would I use a Hook?

Basic React Hooks

React Hooks
  1. useState
const [state, setState] = useState(initialState);
Example of useState
useEffect(() => {})
Example using useEffect
const value = useContext(ContextObject)
Example using useContext

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store