|
|
|
|
|
by gulugawa
42 days ago
|
|
How do you decide to use useContext, useReducer, useState, or a third party management tool to manage 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.