````
import { Parallax, ParallaxLayer } from 'react-spring'
const Page = ({ offset, caption, first, second, gradient, onClick }) => (
<Parallax.Layer offset={offset} speed={-0.2} onClick={onClick}>
<div className={`slopeEnd ${gradient}`} />
</Parallax.Layer>
<Parallax.Layer className="text number" offset={offset} speed={0.3}>
<span>0{offset + 1}</span>
</Parallax.Layer>
<Parallax.Layer className="text header" offset={offset} speed={0.4}>
<span>
<p style={{ fontSize: 20 }}>{caption}</p>
<div className={`stripe ${gradient}`} />
<p>{first}</p>
<p>{second}</p>
</span>
</Parallax.Layer>
)
const scroll = to => this.refs.parallax.scrollTo(to)
const IndexPage = ({ transition }) => (
```
Unhandled promise rejection
TypeError: React.createContext is not a function
Stack trace:
./node_modules/react-spring/dist/react-spring.cjs.js@http://localhost:8001/commons.js:46226:29
__webpack_require__@http://localhost:8001/commons.js:556:12
````
createContext is a React 16.3 feature. Can you console.log(React.version) and see what the result is?
I鈥檓 sure you have gatsby-plugin-react-next installed, since React.Fragment doesn鈥檛 throw an error.
If you鈥檙e on < 16.3, you can uninstall and reinstall gatsby-plugin-react-next so that it鈥檒l reinstall the latest React version.
console.log(React.version) = React not defined.
"gatsby-plugin-react-next": "^1.0.11",
TypeError: react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext is not a function
"gatsby": "2.0.0-alpha.23",
If you鈥檙e using Gatsby v2, you need to install React and react-dom manually. I would avoid using v2 until it goes on beta.
Most helpful comment
createContext is a React 16.3 feature. Can you console.log(React.version) and see what the result is?
I鈥檓 sure you have gatsby-plugin-react-next installed, since React.Fragment doesn鈥檛 throw an error.
If you鈥檙e on < 16.3, you can uninstall and reinstall gatsby-plugin-react-next so that it鈥檒l reinstall the latest React version.