3 ms·
I'm not sure this is anything specific to react? Its just a question of internal vs external state. Internal state gets managed by the component itself, externa
by WickyNilliams 5y ago
I'm not sure this is anything specific to react? Its just a question of internal vs external state. Internal state gets managed by the component itself, external state gets managed by some ancestor in the tree. One component's internal state is another's external state. No different to objects or any other data modelling exercise imo.
As for rendering a single instance in two places, you'd see weird behaviour trying to do the same with raw DOM element instance (well not so weird as not being able to render in two places).