Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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: