3 ms·
> The structure of your application state ends up being shaped by the UI, when it should be the other way around I don’t understand this premise at all. Are yo
by padjo 2y ago
> The structure of your application state ends up being shaped by the UI, when it should be the other way around
I don’t understand this premise at all. Are you saying your UI should be shaped by your application state? That doesn’t make any sense to me, surely the application state exists to implement a desired UI?
- danielvaughn 2y agoI could've said that better, what I really meant is that UI is (a) downstream of state, and (b) has a different structure than state. The UI is a tree but state is basically a graph, and it doesn't make sense to couple the two. This is the same position that SolidJS takes, for instance. To respond to your last statement though, I feel the opposite is true. UI's don't exist for their own sake, they only exist to support the application and its behavior.