1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 07:08:01 +00:00

Add Use React 16 With Gatsby as a react til

This commit is contained in:
jbranchaud
2018-04-30 17:16:33 -05:00
parent 239318da54
commit 31c71f1b58
2 changed files with 25 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
# Use React 16 With Gatsby
[Gatsby](https://www.gatsbyjs.org/), the blazing fast static site generator
for React, is tied to React 15.6. If you've been using React 16+ for a
while, then this may come as a bit of a buzzkill.
Fortunately, there is a Gatsby plugin that let's you use React 16 with a
Gatsby v1 site --
[gatsby-plugin-react-next](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-react-next).
Add it the plugin as a dependency:
```bash
$ yarn add gatsby-plugin-react-next
```
Then add it to the list of plugins in `gatsby-config.js`:
```javascript
plugins: [`gatsby-plugin-react-next`];
```
[source](https://twitter.com/gatsbyjs/status/990806495959826432)