Gatsby: createContext is not a function

Created on 19 Apr 2018  路  3Comments  路  Source: gatsbyjs/gatsby

Trying to use the React context, but and getting createContext is not a function.

I see Gatsby is using React version 16.3.10, which should have the new context - what am I missing?

question or discussion

All 3 comments

Gatsby v1 uses react 15. We will bump this in v2 version of gatsby.

To use react 16 in v1 you need to use https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-react-next.

Where do you see gatsby using react 16.3 ?

@pieh thanks, was not aware of this.

What's the timeline for v2?

We don't have timeline - only github project tracking things that need to be done - https://github.com/gatsbyjs/gatsby/projects/2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hobochild picture hobochild  路  3Comments

jimfilippou picture jimfilippou  路  3Comments

totsteps picture totsteps  路  3Comments

timbrandin picture timbrandin  路  3Comments

magicly picture magicly  路  3Comments