E
E
Egor2016-10-16 20:14:47
Express.js
Egor, 2016-10-16 20:14:47

Is it possible to render a React app on the server with local classes?

There is an application on react in which webpack generates classes automatically.
I've come across things like this:

if ( process.env.BROWSER ) {
    require('./Footer.less');
}

When rendering on the server, this will work if the classes are set to global. In general, is it possible to make a render to the server normally with local classes?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
KnightForce, 2017-05-15
@KnightForce

renderToString()- there is in the docs.)
https://facebook.github.io/react/docs/react-dom-se...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question