reactjs - State of states in React -


i've searched didn't find related.

is possible have in react state has other states?

for example, if there list of states , each of these states when activated can have other lists of states? if yes, approach this?

yes possible. technically state simple javascript object , there nothing prohibit nesting objects , using each state corresponding component.

you can store state of child components outside in parent component state , pass them down children in props. each child respectively use object set state in constructor.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -