News for hackers. Stuff that matters.
Re:Ask HN: ReactJS – Do you use it? Do you like it? by netik on Saturday June 20, 2015 @09:24PM (#9751721)
I migrated nearly all of troupeit.com over to ReactJS.

I really love it, but my biggest complaint has to be the mixing of logic and views together, and the duplication of security checks. Although I'm not entirely sure I can blame react for that, I blame my moving from CGI to Ajax/RESTFul interfaces for most of that pain.

We had about 90% of our codebase in RoR. In retrospect, I wish I had used Flux instead of React-Rails, but I didn't have that luxury as I was not starting from scratch.

As far as react and rendering data goes, I do wish there was an easier way in the render stack to conditionally display data. It's hard to squeeze logic into render()

Re:Ask HN: ReactJS – Do you use it? Do you like it? by karmajunkie on Saturday June 20, 2015 @09:41PM (#9751762)
I'm moving a project over to flux (well, reflux), and I'm still using react-rails. I'm probably doing a lot of stuff "wrong", but what I'm basically doing is instead of injecting data directly into the react component is inject it directly into the store.[1] Mainly I'm doing it as an intermediate step towards a separated client app with an api, but the upshot is (I think) my components are doing it in something that resembles a sane way, so all I need to modify later is the store logic. (Keeping in mind this is my first go-round with React, so those more experienced with it may tell both of us what a horrible idea this is. :) )

[1] https://gist.github.com/karmajunkie/8dd5367837ee8d2bd5bd

Re:Ask HN: ReactJS – Do you use it? Do you like it? by nearengine on Saturday June 20, 2015 @10:21PM (#9751877)
Not all of your logic has to be in render() itself. You can define other methods on your component that will be bound to `this` in render(), so you can just call them like `this.renderFoo()`. Each one just has to return a single root node with optional children like the render() method does.
Re:Ask HN: ReactJS – Do you use it? Do you like it? by supercoder on Sunday June 21, 2015 @12:18AM (#9752149)
I'm using ReactJS with a rails app, and are doing so without needing the security checks on the client side.