Question: Component Container and State Hoisting
Closed this issue · 1 comments
Hello!
I have read all your react patterns and think it is a good approach. :)
But I have one question that is a bit unclear in your explanations;
You say the following:
“A container does data fetching and then renders its corresponding sub-component. That’s it.”
In the "State hoisting" chapter you say that
"Events are changes in state. Their data needs to be passed to stateful container components parents."
Is the purpose to have one container for state updates and one container for fetching data or do you think it's ok to mix fetching data (e.g. from a server) and state updates in the same component container?
Thanks in advance!
@widdde I'm so sorry that it took me 2 years to get to the issues on this repo 😬
To answer your question, I I would use two different state providers for this.
How did you end up solving this problem in your code?