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

Pass context directly #7

Merged
merged 1 commit into from
Dec 27, 2017
Merged

Pass context directly #7

merged 1 commit into from
Dec 27, 2017

Conversation

thealjey
Copy link
Contributor

Passing the ctx context allows the composed component to gain access to the req and res objects on the server side.

Passing the `ctx` context allows the composed component to gain access to the `req` and `res` objects on the server side.
@adamsoffer
Copy link
Owner

Brill. Thank you!

@adamsoffer adamsoffer merged commit a3786a0 into adamsoffer:master Dec 27, 2017
@adamsoffer
Copy link
Owner

adamsoffer commented Dec 28, 2017

@thealjey I updated the package. Could you confirm the next-apollo-example still works with this change? It seems to have broken server side rendering on my end. Something to do with the ctx getting passed down. https://github.com/ads1018/next-apollo-example

@adamsoffer
Copy link
Owner

adamsoffer commented Dec 28, 2017

Works fine when I remove the pathname from the header component. Not sure why...

@adamsoffer
Copy link
Owner

Update: had to use withRouter HOC inside the Header component. Completely unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants