39 ms·
I don't agree with the view that a component doesn't need a prop "itself" if it "only" passes it on to a child component. That child component is a part of the
by prance 9y ago
I don't agree with the view that a component doesn't need a prop "itself" if it "only" passes it on to a child component. That child component is a part of the parent. If one decided that e.g. the child is too simple to warrant to be its own component and inlined its render() content in the parent instead, suddenly its used props would be needed by the parent "itself".
Another thing to consider is that one tightly couples components to stores when connecting. So reusability of these components is hampered.
- pedalpete 9y agoIf was my understanding that if a component has a prop which changes, even if that prop is passed down the tree, the component will still update. This is one way I use redux, the connector watches for changes in state and then updates the component directly, rather than passing props down the tree.