|
|
|
|
|
by qudat
1121 days ago
|
|
view = func(state). That’s the magic of react. The problem is no longer manually managing transitions between state but state itself. That’s why state management is so critical in the react ecosystem. Further, react has delegated two key features to userland: side effect and state management. Personally, I don’t want react to solve either of these problems because it’ll just turn into the disaster that is react server components: feature development driven by corporate interests (eg vercel). |
|
If this was actually how it worked, I'd have much less problem with react. What I mean, specifically, is that not all function dependencies are explicit. This makes it look like the state is passed into some function. And then the view is returned, depending only on state. In reality, half the state is passed in (as in the argument to a function call), and half comes out of some mysterious hook storage structure. If the state was really a function argument, you could easily inspect the whole state in a debugger. Instead of... I'm not sure how you'd actually do that.