Answer the question
In order to leave comments, you need to log in
How to respond to changes in children?
There is a route profile
, I connect to it redux
. He has children profile/edit и profile/add
, I separately connect redux to them.
And so these children in a modal window over profile
a page are displayed. In profile
I added {this.props.children}
Loading profile
, I see the spinner spinning, and that's all. Because when the state
children are updated, the component is not updated, and when the state
parent is updated, then everything is fine.
You can receive state in the parent and pass it through cloneComponent
. So far this is the only option I see.
Maybe there is something else?
Answer the question
In order to leave comments, you need to log in
Maybe try with event-emitter or PubSub . Generate an event and a subscription to it, and pass everything you need as a parameter.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question