Skip to content
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

Update react-apollo.md #4026

Merged
merged 8 commits into from
Jan 2, 2019
Merged

Update react-apollo.md #4026

merged 8 commits into from
Jan 2, 2019

Conversation

mattphoto
Copy link
Contributor

@mattphoto mattphoto commented Oct 18, 2018

function declarations are hoisted but classes are not. So when one passes a class into withApollo HOC, the export statement must be below the class declaration. Switching the order in the example code will avoid users from running into this issue.

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

function declarations are hoisted but classes are not. So when one passes a class into withApollo HOC, the export statement must be below the class declaration. Switching the order in the example code will avoid users from running into this issue.
@apollo-cla
Copy link

@mattphoto: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

@hwillson hwillson added this to Current Sprint in Apollo Client Dec 12, 2018
@hwillson hwillson moved this from Current Sprint to In Progress in Apollo Client Jan 2, 2019
Copy link
Member

@hwillson hwillson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - thanks @mattphoto!

@hwillson hwillson merged commit 2875cba into apollographql:master Jan 2, 2019
@hwillson hwillson moved this from In Progress to Done in Apollo Client Jan 2, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Apollo Client
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants