Is the loadPropsOnServer example up-to-date?
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 :)
put null as the second argument if you don't want to pass loadContext. So yes, context is there
Thanks @zackify .
Sorry, just realised that there's already a PR for this https://github.com/ryanflorence/async-props/pull/60.
What would the loadContext be used for if it was passed? Populating components' contexts?
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 [email protected] wrote:
Thanks @zackify https://github.com/zackify .
Sorry, just realised that there's already a PR for this #60 https://github.com/ryanflorence/async-props/pull/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 https://github.com/ryanflorence/async-props/issues/63#issuecomment-209988704
That makes sense, thanks for the clarification.