Modify register API to accept renderer functions#581
Modify register API to accept renderer functions#581justin808 merged 1 commit intoshakacode:masterfrom
Conversation
|
@jtibbertsma Very intriguing!
@robwise @alexfedoseev We'll have to give this a close look in the coming weeks. However, please stay focused on F&G v2! We can potentially leverage this when we make a big push for performance after v2 is completed! |
|
@justin808 Sure, I'll work on a pr for react-webpack-rails-tutorial this weekend. |
|
@jtibbertsma I'm looking forward to seeing the changes! |
|
@jtibbertsma Any update? |
|
@justin808 I've been a bit busy this week. I should have some time to work on it today. |
|
@jtibbertsma Could have a simple example in |
|
@justin808 Sure, I'll work on it this week |
|
@jtibbertsma Keep me posted! |
|
@justin808 I added a simple integration test that shows that the renderer function gets called correctly. |
|
@jtibbertsma REALLY AWESOME. Let's address the comments! Reviewed 8 of 12 files at r1, 8 of 8 files at r4, 2 of 2 files at r5. CHANGELOG.md, line 8 at r5 (raw file):
reference the PR, as done below for other changes you can use the release 6.2.0 and change the bottom part showing the diff README.md, line 456 at r5 (raw file):
we should mention the README.md, line 476 at r5 (raw file):
we need to refer to the page on code splitting here docs/additional-reading/code-splitting.md, line 15 at r5 (raw file):
this is formatting so you have to scroll sideways a ton please see if you can change that docs/additional-reading/code-splitting.md, line 18 at r5 (raw file):
I'm a bit confused about the interaction between deferred rendering and react-router. Is the idea that a page is bookmarked, and react-router's deferred rendering counts as a first render, so that the server render and what's in react-router's deferred renders should be the same? It would be great to have some graphic or other explanation of this. What's not obvious is that we can server render what the deferred rendering will be. docs/additional-reading/code-splitting.md, line 26 at r5 (raw file):
Maybe use docs/additional-reading/code-splitting.md, line 42 at r5 (raw file):
We need to be very clear that RouterApp will handle calling ReactDOM to create the react element, attached to a DOM node. Should we be showing some docs/additional-reading/code-splitting.md, line 85 at r5 (raw file):
maybe:
docs/api/javascript-api.md, line 64 at r5 (raw file):
We might be able to throw an error if this is called on the server since we'll know we're server rendering with the rails context. node_package/src/ReactOnRails.js, line 114 at r5 (raw file):
Please move this next to the definition immediately below spec/dummy/client/app/startup/ManualRenderAppRenderer.jsx, line 12 at r5 (raw file):
I feel that we need the example to show react-router. We use react-router in the dummy apps. Another consideration is support for react-router v4. Comments from Reviewable |
|
I have one comment below. And also one more comment on the global API: I'm not a big fan of owning key deps (as Review status: all files reviewed at latest revision, 12 unresolved discussions. docs/additional-reading/code-splitting.md, line 85 at r5 (raw file):
I don't think the main point here is different webpack configs (as client/server configs are usually different regardless of whether or not code splitting is used), but the fact that it requires different Comments from Reviewable |
|
Review status: 13 of 18 files reviewed at latest revision, 12 unresolved discussions. docs/additional-reading/code-splitting.md, line 18 at r5 (raw file):
|
|
Review status: 13 of 18 files reviewed at latest revision, 12 unresolved discussions. docs/api/javascript-api.md, line 64 at r5 (raw file):
|
|
Review status: 13 of 18 files reviewed at latest revision, 12 unresolved discussions. spec/dummy/client/app/startup/ManualRenderAppRenderer.jsx, line 12 at r5 (raw file):
|
|
Looking good! Reviewed 5 of 5 files at r6. docs/additional-reading/code-splitting.md, line 18 at r5 (raw file):
|
|
@jtibbertsma I'd like to get this in the next release, maybe this weekend! |
|
Review status: all files reviewed at latest revision, 5 unresolved discussions. docs/additional-reading/code-splitting.md, line 85 at r5 (raw file):
|
|
Review status: 17 of 18 files reviewed at latest revision, 5 unresolved discussions. docs/additional-reading/code-splitting.md, line 18 at r5 (raw file):
|
|
Review status: 17 of 18 files reviewed at latest revision, 5 unresolved discussions. docs/additional-reading/code-splitting.md, line 58 at r6 (raw file):
|
|
Reviewed 6 of 6 files at r17. Comments from Reviewable |
See Issue #477
This change is