Thanks, I appreciate that!
It’s possible that it’s just a case of being too close to the code for too long and burning out and so I’m overly pessimistic on it.
But basically I feel that I haven’t been particularly consistent with how I manage state or how I manage UI components. It’s been pretty much all ad hoc “I need some place to store this, let’s make a new var!” and “this component now needs to get to access state, let’s just reference the state var and rum/react to it” and then, later “let’s add it as a argument [sometimes in an argmap, sometimes not]”. Basically I haven’t been consistent in a lot of these areas and it starts to feel bad after awhile.
Most recently I had the thought that I should add a default portfolio name if the user doesn’t provide one for the portfolio form here:
The default name should be “portfolioX” where X is the count of portfolios. So now this component needs to (reactively) access all the portfolios, or at least the count of them. Which I suppose I could just easily add. But I guess after a while as the app gets bigger I’m just slowly starting to reference global state everywhere in an ad hoc basis as needed. I’m not even sure that passing the state as an argument does anything to make the code nicer, it just adds a layer of indirection, but there is still an increasing pile of interconnected spaghetti.
I think the essence of this rambling and my frustrations might just be that “UIs are hard because they are inherently big piles of mutable state”.