-
Notifications
You must be signed in to change notification settings - Fork 0
[React Style] Server side
Hill Liu edited this page Mar 9, 2022
·
7 revisions
-
In server side you could render css style directly.
-
You could use a special flag to separate normal output (console.log) and react output (ReactServer.renderToString).
- Such as
var tmp = ReactServer.renderToString(MyApp(
myJson
));
console.log('<!--start-->'+tmp);
- So far, you could have two types of content (html & css style), then react will not complain client and server have different output anymore.