Hi. How is it meant to deal with component states?...
# kvision
p
Hi. How is it meant to deal with component states? Do I need to store everything in global app store? The use case is a
main
component with several children. All children have identical functionality and are effectively a parent-child view. Where am I supposed to store
selected child in parent view
data, so it would survive
main
component refresh on global state update?
r
Hi
If you are talking about reactive paradigm then generally yes, the state is usually stored outside of the UI structure. It can be Redux store, StateFlow or other observable component.
The first state implementation in KVision was Redux, so its "single source of truth" principle is the way to go 🙂