Post

What I'm hoping to accomplish is to have a business logic layer written in a framework-agnostic way and get the view layer to let go of state management. Buying into a different set of state management opinions seems scary. But will check it out!

0 reposts0 likes

Preact signals (with the React bindings) could work as they're built to be framework agnostic and therefore work standalone. However, given React's model that "UI = fn(state)", I don't think you can separate the two entirely. At best, you're abstracting/hiding the ties between them.

Indeed, but that's largely the goal. The main problem the React model was trying to address is unpredictable UI born from state not being the only driver of UI; ordering, timing, etc. mattered too. It's totally valid to want them separated but you're going to be fighting against React to do it.

And, along those lines, signals can help you get state out of your components but your UI is still going to be entirely derived from the state within said signals. It's closer to the goal, but whether that's good enough is very much up for users to decide.