gajus / isomorphic-webpack

Abstracts universal consumption of application code base using webpack.
Other
291 stars 16 forks source link

Add a demo of using HRM client side together with server-side rendering #11

Open gajus opened 7 years ago

gajus commented 7 years ago

Related:

There appears to be some confusion about the hot-reloading functionality.

I have added an explanation to why hot-reloading "does not work" server-side to the FAQ (https://github.com/gajus/isomorphic-webpack#isomorphic-webpack-faq-how-does-the-hot-reloading-work). However, it might be useful to add an example that demonstrates how to use client-side HMR in combination with server-side rendering.

hulkish commented 7 years ago

+1 !!

mengxingshike2012 commented 7 years ago

Your work is great. For a completely server side rendering demo, can you advice how to deal with the preload of data to render the page? E.g for some other boilerplate of ssr, I noticed if we manually handle the route in the server side, we preload the data and when the component has been rendered in the client, the logic of loading data (either in componentWillMount or componentDidMount) will be executed again. one solution could be add timestamp but seems to be tricky. Any suggestions to make loading data universal ?

gajus commented 7 years ago

For a completely server side rendering demo, can you advice how to deal with the preload of data to render the page? E.g for some other boilerplate of ssr

Please open a separate issue.