-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Hill Liu edited this page Feb 27, 2016
·
13 revisions
-
In server side you could render css style directly.
-
And for react-dom you could use renderToString and use a special flag to split normal output and react-dom.
- Such as
var tmp = ReactServer.renderToString(MyApp( myJson )); console.log(''+tmp);
* Whole code https://github.com/pmvc-theme/hello_react/blob/master/server.js
3. So for finial rendering, you could split two type content (html & css style), then react will not complain client and server have different output anymore.
* Code example: https://github.com/pmvc-plugin/view_react/blob/master/view_react.php#L38-L46