This video will show you how to create a simple Global State using React's useReducer hook and Context API. We then add the Global State to our Gatsby.js website and explore how to get the state to persist between Gatsby pages.
For more articles about JavaScript, React, or Gatsby.js, check out: https://codebushi.com
GitHub Repo: https://github.com/codebushi/gatsby-global-state
Kent Dodd's Context article: https://kentcdodds.com/blog/how-to-use-react-context-effectively
Gatsby Docs on wrapRootElement: https://www.gatsbyjs.org/docs/ssr-apis/#wrapRootElement
Download
0 formats
No download links available.
Gatsby.js Global State with React Context and useReducer Hooks | NatokHD