Post

I think your first example highlights the drawbacks of derived state. I think the situation of selected user “coming back” when that user is available in backend data is almost never wanted in practice?

I think you introduce a new class of problems it becomes difficult to reason about UX as server data changes. Client state being explicit with effects and state may not be easy, but it is simple. You render what is in client state that’s it. You want to render something? Put it in client state.

One thing I think we both understand but is widely under appreciated in the industry is the large amount of essential/inherent complexity in state systems. It’s where 99% of bugs exist. There’s not even a name for this kind of work. I call it “product architecture”.

I think the use-case where we were starting from isn't ideal either: removing what a user has purposefully selected in the UI because it becomes invalid is weird. That's why I hinted that deriving can also just show that the value is invalid.