Hacker News new | ask | show | jobs
by PostingWithPSP 4427 days ago
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."

1 comments

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.