Re:The 3REE Stack: React, Redux, RethinkDB and Express.js
by PhrosTT on Tuesday October 06, 2015 @12:00AM
(#10336697)
I'm using React + Redux + Koa (+postgresql). The most annoying thing with JavaScript right now is that Babel gives you all ES6 features in your front end bundle, but node 4 only has a subset, so you have to remember when you to stop using features. (No I don't want to transpile back end code).
Re:The 3REE Stack: React, Redux, RethinkDB and Express.js
by desuvader on Tuesday October 06, 2015 @04:05AM
(#10337354)
You can use Babel with node on the back end. See https://babeljs.io/docs/usage/require/. Definitely not the most ideal solution, but it allows you to easily transition into ES6 when all the features land in node.
Re:The 3REE Stack: React, Redux, RethinkDB and Express.js
by bryanlarsen on Monday October 05, 2015 @05:37PM
(#10335155)
But neither koa.js nor express.js do websockets. You're holding up a site that would probably be simpler without both koa and express as an example to say that it doesn't make much of a difference whether you choose koa.js or express.js.
Not that this was covered in the article, but it would be a reason to choose Express as the backend. It would be cool to build something similar for Koa though.
Re:The 3REE Stack: React, Redux, RethinkDB and Express.js
by GordyMD on Monday October 05, 2015 @04:29PM
(#10334675)
I think if you take a lot at the motivations that Dan Abramov had for creating Redux [1], you'll see that improving debugging was at the centre of it. Check out his talk he gave at React-Europe. He basically is talking about improving developer tools. The functional approach Redux takes allows for you to see state transitions and replay actions - making it relatively trivial (compared to say Angular.js) to understand how to reproduce a buggy state.
Re:The 3REE Stack: React, Redux, RethinkDB and Express.js
by bonobo3000 on Monday October 05, 2015 @04:53PM
(#10334842)
Dude, this is half the point of redux. Theres a debugger that lets you visually step through every state of the store and your corresponding app - https://github.com/gaearon/redux-devtools
Re:The 3REE Stack: React, Redux, RethinkDB and Express.js
by eonw on Monday October 05, 2015 @05:32PM
(#10335122)
yea, i know, i read it. wasnt much there. already know what all the tools did.... by why jump to this stack from one of the other 15 that came out this year?
I use the auto-transpilation trick with Babel. You can see a small example in my repo: https://github.com/odiroot/songs-to-spotify/blob/master/src/...
Then in required modules you're free to use ES2015.
React - first commit May 29, 2013
Flux - first commit July 23, 2014
ExpressJS - first commit July 31, 2012
RethinkDB - first commit Oct 3, 2009
Yeah, I doubt it.
Check this out https://github.com/joshhunt/reactapus/blob/master/src/server.... Koa or Express.js wouldn't really make that much of a difference.
Not that this was covered in the article, but it would be a reason to choose Express as the backend. It would be cool to build something similar for Koa though.
Although saying that, if I had chosen Koa.js the stack would have to be called 3REK, or 3RKE :/
[1] https://github.com/rackt/redux
[2] https://www.youtube.com/watch?v=xsSnOQynTHs
what are its merits?