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

initialize state to null if not when not set #1310

Merged
merged 2 commits into from Oct 31, 2017

Conversation

Projects
None yet
2 participants
@mattfysh
Copy link
Contributor

mattfysh commented Oct 31, 2017

Fixes #1249

Checklist:

  • 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.
@mattfysh

This comment has been minimized.

Copy link
Contributor Author

mattfysh commented Oct 31, 2017

This fixes an issue with react-emotion due to an explicit check in their library for null:

https://github.com/emotion-js/emotion/blob/master/packages/react-emotion/src/index.js#L82

The react-apollo SSR walk needs to be updated to match React behaviour, i.e. isNull(this.state)

@mattfysh mattfysh changed the title initialize state to null if not set by components constructor, fixes … initialize state to null if not when not set Oct 31, 2017

@mattfysh

This comment has been minimized.

Copy link
Contributor Author

mattfysh commented Oct 31, 2017

@jbaxleyiii - this is a rework of #1300 applied to latest master, however tests in an unrelated area are failing. Does this mean they are also failing in master? I can't see any changes I've made that could affect the unit tests that are breaking. Thanks! 👍

@jbaxleyiii

This comment has been minimized.

Copy link
Member

jbaxleyiii commented Oct 31, 2017

@mattfysh yep not you! That's a flaky test I need to rewrite haha

@jbaxleyiii jbaxleyiii merged commit b52b017 into apollographql:master Oct 31, 2017

3 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
CLA Author has signed the Meteor CLA.
Details
Danger All green. Yay.
Details
bundlesize ./dist/index.min.js: 8.46kB < maxSize 8.6kB gzip
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment