DEV Community

Discussion on: Single source of truth, how good/bad can it be?

 
vonheikemen profile image
Heiker

But is it really the only alternative to store all of these properties in a single giant object?

It's the only one I can think of.

What I want is to remove all the state from every component.
So I can write my components like this.

function SomeView(state, actions) {
  // optionally some setup step... but not too much

  return // awesome stuff
}

For the state management could be a pattern like the ones described in here or here, or any other suggestion. Those are not exactly what I want but they are really close.