Skip to content
This repository was archived by the owner on Jan 27, 2019. It is now read-only.

greglobinski/example-gatsby-unstated

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a73aa2f · Nov 21, 2018

History

7 Commits
Aug 1, 2018
Aug 1, 2018
Jul 30, 2018
Jul 30, 2018
Jul 30, 2018
Aug 1, 2018
Nov 21, 2018
Jul 30, 2018
Jul 30, 2018
Nov 21, 2018
Aug 1, 2018
Aug 1, 2018
Aug 1, 2018
Jul 30, 2018
Aug 1, 2018
Aug 1, 2018

Repository files navigation

This is an example of usage Unstated state container with GatsbyJS

Live Demo

To use unstated in a Gatsby site you'll need to hook in to two of Gatsby's extension points.

Once in replaceRenderer which runs during Gatsby's server rendering process, and once in replaceRouterComponent which is part of Gatsby's browser APIs.

Check out ./gatsby-ssr.js and ./gatsby-browser.js to see how this is implemented in this example.

Run on localhost

gatsby new example-gatsby-unstated https://github.com/greglobinski/example-gatsby-unstated.git
cd example-gatsby-unstated
gatsby develop

Test

Tests based on jest and react-testing-library

yarn test

Releases

No releases published

Packages

No packages published