Live data from Hacker News

Ask HN: ReactJS – Do you use it? Do you like it?

news.ycombinator.com

11–20 of 78 posts

Re: Ask HN: ReactJS – Do you use it? Do you like it?

#11
post #10

I wish it worked better with TypeScript. I love the concept and I've always felt that front-end web was broken compared to iOS. I've worked on converting some of Reacts tutorial to TypeScript just to try it out. Here's some of the code, and it's not 100%. https://gist.github.com/seivan/c01a3b1173cd237b8531

Would you mind elaborating on the TypeScript comment? Is anything broken or just suboptimal?

Re: Ask HN: ReactJS – Do you use it? Do you like it?

#12
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?

#13
post #11
post #10

I wish it worked better with TypeScript. I love the concept and I've always felt that front-end web was broken compared to iOS. I've worked on converting some of Reacts tutorial to TypeScript just to try it out. Here's some of the code, and it's not 100%. https://gist.github.com/seivan/c01a3b1173cd237b8531

Would you mind elaborating on the TypeScript comment? Is anything broken or just suboptimal?

It's suboptimal and obscure. There is barely any up to date resources on it.

So far I've managed to get to stuff presented on the window, but as soon as you start messing with references to the DOM components, things start to break down.

It's a shame, I really think Typescript and React would be the answer to getting a decent code base.

One of the cool parts, is that you get to define what your property is with static type checking and have no need to use Reacts on PropValidator.

let search = new SearchBox })

That tells you that the SearchBox props contains SearchOptions and a delegate to call when searching

I'm just starting with both React and TypeScript, so it could just be me.

Re: Ask HN: ReactJS – Do you use it? Do you like it?

#14
Really loving it so far! Having a harder time actually organizing all of the application's assets and figuring out a more optimized way of having all of the assets work well together.

So what are best practices for using React with PHP, for example? For some more context, using Webpack to bundle up all the React logic into a single file. Static views are being served via PHP MVC, and React parent components are attached to window. Then, React parent component is being called within PHP file.

What would be a better way of handling React in a PHP application?

Re: Ask HN: ReactJS – Do you use it? Do you like it?

#15
post #6

I'm using it for a very large enterprise app. React's advantage is the declarative style, very easy to reason about your View logic. Team productivity is up, fixing/changing older UI is easier/quicker, it's great. We've tried angular, we were using just vanilla JS and Jquery, React is great. A great resource you should check out is the slack channel Reactiflux. Many active people and they will answer any question you…

I am using React for a smaller enterprise application and find it quite difficult to reason about. But perhaps it's not well suited to deeply nested forms with lots of fields.

After about six months, I finally feel like I've got a handle on how it works, sort of. It's probably not something I'll use again on future projects though.

Re: Ask HN: ReactJS – Do you use it? Do you like it?

#16
post #12

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-…

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?

#17
post #15
post #6

I'm using it for a very large enterprise app. React's advantage is the declarative style, very easy to reason about your View logic. Team productivity is up, fixing/changing older UI is easier/quicker, it's great. We've tried angular, we were using just vanilla JS and Jquery, React is great. A great resource you should check out is the slack channel Reactiflux. Many active people and they will answer any question you…

I am using React for a smaller enterprise application and find it quite difficult to reason about. But perhaps it's not well suited to deeply nested forms with lots of fields. After about six months, I finally feel like I've got a handle on how it works, sort of. It's probably not something I'll use again on future projects though.

I feel like you lose out on using React if your application isn't going to be huge in terms of "components" and states.

You're probably better off using simple_form and Turbolinks with Rails.

Re: Ask HN: ReactJS – Do you use it? Do you like it?

#18
It's great but it's a real pity that the most recent way of doing things with version 0.13 and ES2015 is quite different to the earlier ways of doing things.

Don't get me wrong - the newest ways of working with 0.13 and ES6/ES2015 are superb.

It's just that as a result of the changes much of the documentation, discussion, questions and answers and blog posts must first be examined to work out which version and way of doing things they are talking about. It's a bit of a mess frankly.

Re: Ask HN: ReactJS – Do you use it? Do you like it?

#19
We're in the final stages of migrating a large non-web system to react for a client right now (we're up to ~200kLOC of JS) first big project our new company is doing. Next time I'd use an immstruct layer for maintaining state, and maybe a thinner vdom library instead of react. Not a fan of flux at this scale, it's too easy to have components being dependent on their position in the tree, so we tend to have lots of wrapper-boilerplate that just pulls data out of the store and pass it to immutable components. I'd rather just have a module dedicated to the task, and have immstruct sort out how to dispatch updates efficiently, acting as a 'JSON-view' of the server's state.

On the other hand, some clients seem to have heard of react now, so that's a big plus of using it. We'll probably end up doing more.

Re: Ask HN: ReactJS – Do you use it? Do you like it?

#20
I've moved from angular to react and i'm happy. Simple, really simple!!! interface. All you need is to remember just few methods of one (ONE!!!) class. It's fast enough to create interfaces with a lot of objects.

With react and react-native i start publish my projects on github, because they has a simple structure and can be easily supported.

I almost forget jQuery, it's really rare situation when i need to access real DOM.

Big amount of flux frameworks (i love [flummox](https://github.com/acdlite/flummox) , [redux](https://github.com/gaearon/redux)).

I read discussions (in twitter, in github issues, in slack http://www.reactiflux.com/) of this guys @sebmarkbage, @Vjeux, @dan_abramov, @acdlite and many others as like "THE BEST PROGRAMMING BOOK I'VE EVER READ"

My [app](https://github.com/istarkov/google-map-react) hit the top trending github apps, thanks to react community. (it's not easy for developer to show his work to the world)

React is GREAT!!!

Post reply on HN