-
Notifications
You must be signed in to change notification settings - Fork 786
Support getDerivedStateFromProps #2076
Support getDerivedStateFromProps #2076
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to go! I appreciated the separate commit for indentation.
@mike-marcacci Thanks for the review! Can this be merged then? |
@amannn I think one change is required - if |
@trojanowski Good point! I've updated the PR accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @amannn - thanks very much!
@marnusw Merging it now, which means we should be able to get this released tomorrow. |
This is now available in |
Thank for this bug fix... Was waiting for this for some time. But now I get "loading" on SSR everywhere. Each server side rendered page return loading in the source code and empty apollo state. Data is loaded fine after page loads in the browser. any ideas how to fix? |
Even with the latest react-apollo (2.1.11) I still get the error (with
|
Having the same experience as @tab00.
React v16.5.2 |
In contrast to
componentWillReceiveProps
, the newgetDerivedStateFromProps
lifecycle method is also called before the first render.It looks like you have some kind of script set up that fixes indentation before a commit. I therefore made two separate commits, so it's easier to differentiate the actual change from the diff.
Checklist: