(I know useContext isn't great for state management, but I've worked on a web application where useContext was used to store complex global state).
(I know useContext isn't great for state management, but I've worked on a web application where useContext was used to store complex global state).
Specifically I wrote a bunch of React components for making little biosignals applications that can (say) show two people's heartrate from bluetooth LE and show my breathing based on a strap i am wearing and another person's breathing based on a $20 radar from China.
I can pretty easily snap together the components and the system that feeds the state to the components by writing code. It works great, it's not that hard to do, it looks great.
But: I really wish I could make something where I could drag and drop display and data acquisition and processing components like LabView. Actually I know a lot about how to do the dynamic processing (Hint: read the Dragon book, not On Lisp) but React doesn't support dynamically assembled components... But I know Javascript systems can because I was writing them 2005-2010 back when browsers didn't have async and all the great affordances they offer now.
I built my own action framework that gives me the ability to use Jotai getters to read atom data, launch asynchronous javascript, and then write to atom data via Jotai setters without ever having to fuss with useEffect myself. Jotai just handles the messy state transition work. My components used to be a jumble of DOM event handler, business logic, and markup, and now the business logic is all extracted to the separate action components.
React makes it hard to test business logic in isolation, and I am hoping my action framework could do a better job of that.
Is your action framework open source? I'd be interested in taking a look at it.