You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
Doesn't set context if it isn't used in constructor (for some reason it does in the browser).
I didn't check React's source code, but it looks like it sets context even if it isn't used in constructor.
Here's a suggested fix:
constComponent=newComponentClass(ownProps,context);try{Component.props=ownProps;+Component.context=context;// not sure about thisComponent.setState=(newState: any)=>{Component.state=assign({},Component.state,newState);};}catch(e){}// tslint:disable-line
The text was updated successfully, but these errors were encountered:
Suppose you have the following react component,
and you want to render it using
getDataFromTree
.Cannot read property 'something' of undefined
error occurs.It appears that this code:
https://github.com/apollostack/react-apollo/blob/4271f68d604e7a6f9c23c7a123a0b15573cafd0e/src/server.ts#L48
Doesn't set context if it isn't used in constructor (for some reason it does in the browser).
I didn't check React's source code, but it looks like it sets context even if it isn't used in constructor.
Here's a suggested fix:
The text was updated successfully, but these errors were encountered: