-
Notifications
You must be signed in to change notification settings - Fork 321
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
The holy-grail of server rendering #284
Conversation
|
||
/*eslint-disable */ | ||
if (typeof window === 'undefined') { | ||
/*eslint-enable */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you added browser: true
in eslint configuration shouldn't you remove the enable/disable comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah. I'm going to either remove browser: true or remove these.
I just threw browser: true in there so lint would shut up so I could push this.
6a573d8
to
9fb883d
Compare
The holy-grail of server rendering
Would you like to elaborate on how this work inside? Sounds nice, hope to see some small example |
Interesting. I tend to put _request_s on the components itself, and just update / hydrate the _store_s with the response. |
@transedward sure. At a high level:
|
@goatslacker thanks for such detailed step by step explanation
so that program won't be blocked until Promise.all resolved and then all the dispatches dispatched? |
If the tests are passing then we have that guarantee: https://github.com/goatslacker/alt/blob/master/test/alt-iso-test.js#L124 it is because we trap dispatches, it is non-blocking however, concurrent requests are allowed. |
@goatslacker I have a few questions about
I'm trying to figure out but I'm getting stuck now :/ Help would be highly appreciated for updating the boilerplate (iam4x/isomorphic-flux-boilerplate#69) |
For |
There's some clean up work I'd still like to do with this but I'm throwing it up here for now to gather early feedback/let people know what's coming.
Why?
It allows us to define our data fetching needs in the component. It's not quite relay though, you don't define what you need but rather how you're going to get it.
This works very well with Alt's Data Sources.
This lets you keep your singleton stores and actions which are easier to reason about and you don't have to pass flux around in context.