New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support passing updater function to `setState` in SSR mode #1263

merged 4 commits into from Oct 24, 2017


None yet
2 participants
Copy link

mdebbar commented Oct 21, 2017

Passing an updater function to setState() is something that React supports and people use this pattern. Fortunately, supporting that pattern in react-apollo's SSR mode is simple, so I added it and covered it with a test.


  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests
  • If this was a change that affects the external API used in GitHunt-React, update GitHunt-React and post a link to the PR in the discussion.

@mdebbar mdebbar force-pushed the mdebbar:master branch from 4b5a5d5 to 1f16d74 Oct 21, 2017

@mdebbar mdebbar changed the title Support setting state via callback in SSR mode Support passing updater function to `setState` in SSR mode Oct 21, 2017

James Baxley

@jbaxleyiii jbaxleyiii merged commit 956aaa8 into apollographql:master Oct 24, 2017

3 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
CLA Author has signed the Meteor CLA.
Danger All green. Well done.
bundlesize ./dist/index.min.js: 11.95KB (same as master)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment