Post

I mean, I know you’re using React but Preact signals kill it when it comes to state. I’d have a look if you haven’t already.

0 reposts0 likes

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!

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.