Hacker News new | past | comments | ask | show | jobs | submit login

I think this is a misrepresentation of what makes React.js valuable. React is useful for optimizing your rendering (model state -> DOM state) because you don't have to think about re-rendering sub-views of things that haven't changed. This has nothing to do with defining a communication flow for your app. You're still propagating state up and down your tree whether it is a tree of Backbone views or React components.

Rendering optimization is definitely a nice thing to not have to think about though.




Composite view management is made easy with React,much more difficult with string templates and Backbone views.

There are Backbone plugins that help but they dont solve the problem at the source,innerHTMLing views is a bad solution to a difficult problem.

What React doesnt solve is the relationship between the view and a model layer outside the view in an frontend application.

AngularJS does solve that problem but it has an expensive cost.

I think we live in an exciting time where problems like these are about to be solved.

Someone,somehow will figure out how to do things the right way. I wish I could,not smart enough,sorry ;)


What do you mean? Child components don't pass their state to parent components. It's what allows React to be declarative. It's right on the front page:

"React implements one-way reactive data flow which reduces boilerplate and is easier to reason about than traditional data binding."


I think when he said "propogating" he was simplifying, "use props to propogate state down the tree and use callbacks to propogate/change state further up the tree"


Even if that's a quote from the site, I still think it's just trying to explain what React is doing in a more digestible way. Any state belongs to one component. The extend of any "propagation" is invoking some function you've been given by your parent.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: