5/12/2019 10:39:21 AM
I don't have a proper way to do that but what strikes on my mind is :
When you render second component you can pass that state item as prop.
That's not the best way I know.
Calviղ can help maybe.
Here a simple sample of passing a state from parent to children component through attribute props in React Hooks.
Yes mate. Let me try it.
Thanks for suggestion Raj Chhatrala!
You can pass state from parent to child. Or the opposite way : from child to parent.
If not ancestor-descendant, route via App.
Raj can you give me example!
Guys,I make it!
What is the problem!?
🇲🇰Maksi - Vik🇲🇰 your code has syntax error, cannot run.
Learn Playing. Play Learning
Send us a message