Closed SOSANA closed 8 years ago
@SOSANA Are you referring to server-side rendering with React?
@sahat yes I was referring to server-side rendering
I use to use puphpet, not sure if you heard of it and was thinking why isn't there a setup like this outside of php (I would strip php out for node.js), than this evening I started going through your repo's to see what you been up too and and stumbled upon this, crazy!
@SOSANA React generator already comes with server-side rendering by default. https://github.com/sahat/megaboilerplate/blob/master/examples/express-nunjucks-postcss-unstyled-react-webpack-mocha-sqlite-twitter/server.js#L117-L130
It's a little complicated because of authentication, but other than that, it's the same code from react-router's guide on server-side rendering.
@sahat I was thinking down the lines of templating using react.js and having option to select it as well, than first inital render done on server, than client takes over after that. Appears at just glancing all routes being handled serverside, but will look into it deeper as I have never used nunjucks before,
Is this only for sqlite?
@sahat are you more in favor of nun,jucks? First FAQ on nunjucks: Can I use nunjucks in node and the browser/client-side? Yes
Would you entertain react.js at this point for templating,and having an option for it?
Thanks @sahat
@SOSANA Template engine choice will go away soon for React. There is little reason to use it since it's just as easy to render "index.html" directly inside App.js component.
@sahat I didn't see any open or closed issues regarding this so thought I would ask.
Are you planning an implementation for universal react and express?
Thanks for this project!