What to choose for server side rendering of react?

Hello, what to choose for ssr ?
poetal articles on Habre, and the questions only became more
as ssr will impact the development of spa ? ie is it possible to start developing a regular spa and then screw the ssr ?
thanks in advance
June 7th 19 at 15:44
2 answers
June 7th 19 at 15:46
It is better to write isomorphic project, as there are many nuances to consider when developing such applications. On github you can find ready boilerplate. Writing your can take from couple hours to couple days depending on the required set of tools. As you can see in such tools as next.js, razzle, after . But I do not know how easy it is, if necessary, to migrate from such decisions.
boilerplate and what would you recommend ? we have now used cra and chchem greatest pain there is node.js pipeline - I think asp retrained on node.js - xavier.Breitenberg21 commented on June 7th 19 at 15:49
there depends on the tools you prefer. Someone is using SASS, and someone writes css-in-js like StyledComponents. Someone uses Flow or TypeScript, and someone do not bother with typing. Someone puts Eslint, Prettier and LintStaged, and someone who relies on care and accuracy. And so with the whole set of tools and libraries.

According to the structure as you can and file type first, and the first feature and ducks pattern. I prefer the structure feature first + ducks.

I did when your generated analysis to draft razle, saw a couple boilerplate on github, read a couple of articles on the subject react ssr hmr and wrote up his preferred set of tools and project structure. - Lenny.Botsfo commented on June 7th 19 at 15:52
can share the link to your implementation? - dannie.Stehr commented on June 7th 19 at 15:55
while not lecturing. Want to do options
react ssr hmr,
react redux ssr hmr,
react flow ssr hmr,
react redux flow ssr hmr.
There's a raw version https://github.com/rockon404/react-ssr-hmr-boilerplate bare with react + react router
But I started it on the basis of do react redux ssr hmr and something has altered. For example, the configs are now variables like:
new webpack.DefinePlugin({
 __CLIENT__: true,
 __SERVER__: false,
 __DEVELOPMENT__: true,
 }),

which is much more convenient and so on.
Well, according to the structure of the app added files:
5a919461df7d1368742072.pngredux saga in the Assembly to add did not, so you can select any analog.
The idea is that any added feature should be easy to prokatyvaetsja in rootReducer(in rootSaga if used) and on the application page and are as easy if necessary to cut.

Don't even know when this all will end, time the latest time a little.
March 12 turn in a large agile project, which uses ssr. Then a week off, maybe it's time for all versions of write and brush your hair. - Lenny.Botsfo commented on June 7th 19 at 15:58
super! I will wait if there is a desire to communicate - cercania in the mail, maybe I can help or accelerate the process. - dannie.Stehr commented on June 7th 19 at 16:01
even to my untutored eyes looks nice and clear (uchityaya that I'm more mobile razrabotchik and backend code on the server don't write this much), but what about the case with the cache parts ?
the article https://habrahabr.ru/post/323458/ write what
Next.js automatically creates a separate chunk for each page

but I don't like strange routing
is there any solution with similar functionality but with normalnym rotinom ? - xavier.Breitenberg21 commented on June 7th 19 at 16:04
June 7th 19 at 15:48
I scored on Reactive and I use Vue (along with SSR).
https://ru.vuejs.org/
https://ssr.vuejs.org/ru/
https://nuxtjs.org/

Find more questions by tags Node.jsServer-Side RenderingExpress.jsReact