Skip to content

Commit

Permalink
Merge pull request #799 from gsklee/patch-2
Browse files Browse the repository at this point in the history
Update ServerRendering.md
  • Loading branch information
gaearon committed Sep 25, 2015
2 parents a44b5e6 + 1150c53 commit 85d905f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/recipes/ServerRendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,6 @@ Furthermore, you can add additional layers of security by sanitizing your state

## Next Steps

You may want to read [Async Actions](../advanced/AsyncActions.md) to learn more about expressing asynchronous flow in Redux with async primitives such Promises and thunks. Keep in mind that anything you learn there can also be applied to universal rendering.
You may want to read [Async Actions](../advanced/AsyncActions.md) to learn more about expressing asynchronous flow in Redux with async primitives such as Promises and thunks. Keep in mind that anything you learn there can also be applied to universal rendering.

If you use something like [React Router](https://github.com/rackt/react-router), you might also want to express your data fetching dependencies as static `fetchData()` methods on your route handler components. They may return [async actions](../advanced/AsyncActions.md), so that your `handleRender` function can match the route to the route handler component classes, dispatch `fetchData()` result for each of them, and render only after the Promises have resolved. This way the specific API calls required for different routes are colocated with the route handler component definitions. You can also use the same technique on the client side to prevent the router from switching the page until its data has been loaded.

0 comments on commit 85d905f

Please sign in to comment.