I want to give the state to the child component in props at componentWillUpdate().

Asked 2 years ago, Updated 2 years ago, 54 views

Do componentWillUpdate() on one component and
I would like to give the state of the parent component in props to the child component when the state or props is updated. How can I do that?

reactjs

2022-09-30 16:24

1 Answers

It's not impossible to do anything by React alone, but wouldn't it be better to use Redux as a requirement?If you don't use Redux, you'll smell something that won't be able to handle complexity in the future...

With Redux, this kind of problem can be solved easily.


2022-09-30 16:24

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.