Skip to content

Fix preload SSR API for React v16.6 #11

Closed
@jaydenseric

Description

@jaydenseric

React v16.6 has some breaking changes to the way the new context API works, causing errors and warnings when attempting to use the preload SSR API, such as:

Warning: Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?
Warning: Failed prop type: The prop `graphql` is marked as required in `GraphQLQuery`, but its value is `undefined`.
Error: Cannot read property 'constructor' of undefined
      at new GraphQLQuery (file://lib/components.mjs:57:42)

I suspect react-apollo will encounter issues too: apollographql/react-apollo#2530

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions