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

Is the loadPropsOnServer example up-to-date? #63

Open
fetimo opened this issue Apr 14, 2016 · 4 comments
Open

Is the loadPropsOnServer example up-to-date? #63

fetimo opened this issue Apr 14, 2016 · 4 comments

Comments

@fetimo
Copy link

fetimo commented Apr 14, 2016

I tried following the server example in README.md but got the error cb is not a function. After looking at loadPropsOnServer it looks like it's expecting 3 arguments where the last is the callback whereas the example has 2 unless I'm missing something?

What should be passed as the second argument, loadContext?

Other than that this library solves a much needed problem so thanks very much :)

@zackify
Copy link

zackify commented Apr 14, 2016

put null as the second argument if you don't want to pass loadContext. So yes, context is there

@fetimo
Copy link
Author

fetimo commented Apr 14, 2016

Thanks @zackify .

Sorry, just realised that there's already a PR for this #60.

What would the loadContext be used for if it was passed? Populating components' contexts?

@zackify
Copy link

zackify commented Apr 14, 2016

Say you have some stuff you want loadProps to know about. Like the request
IP address. You can pass that in to loadProps and have access to it. Or
possibly a cookie. Can't think of a better example right now.
On Thu, Apr 14, 2016 at 11:03 Tim notifications@github.com wrote:

Thanks @zackify https://github.com/zackify .

Sorry, just realised that there's already a PR for this #60
#60.

What would the loadContext be used for if it was passed? Populating
components' contexts?


You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub
#63 (comment)

@fetimo
Copy link
Author

fetimo commented Apr 14, 2016

That makes sense, thanks for the clarification.

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

No branches or pull requests

2 participants