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

Ansible warning on jinja2 braces on when -

Parsing a protocol message from Go by Java -

html - How to custom Bootstrap grid height? -