Challenges with React, React Native, and Redux: Seeking a Solution for Untangled State Management
Hello 
At work we are using react, react-native and next.js. In one of our application we also use redux (not redux-tool-kit) and I find that our code is very hard to read, test and full of pitfalls.
I have recently finished a UI architecture course and since then I was trying to find a way to create some reactive state untangled from any framework then just use a custom or provided binding to connect it to anything we want, Vue, Svelte, Solid, React etc....
Having the state decoupled from any framework would also allow us to make our "black-boxes" and test them in isolation which would also allow us to create more dummy components and cut down on UI and component tests since if our "black-box" is fully tested the UI should (well in theory) represent that state.
I was planning to use
Now, I might be wrong but
I'd love to hear what you guys think.
At work we are using react, react-native and next.js. In one of our application we also use redux (not redux-tool-kit) and I find that our code is very hard to read, test and full of pitfalls.
I have recently finished a UI architecture course and since then I was trying to find a way to create some reactive state untangled from any framework then just use a custom or provided binding to connect it to anything we want, Vue, Svelte, Solid, React etc....
Having the state decoupled from any framework would also allow us to make our "black-boxes" and test them in isolation which would also allow us to create more dummy components and cut down on UI and component tests since if our "black-box" is fully tested the UI should (well in theory) represent that state.
I was planning to use
XState to create different state machines and I was very excited to use their new actor model as well. Now that I have taken a better look at Effect I had an idea to use XState with Effect to make my "vision" happen.Now, I might be wrong but
Effect can also be used to create reactive state and it might not be difficult to make state machines using Effect so I would like to ask the community's opinion if it would be overkill to use XState with Effect? Perhaps some of you have already gotten the same idea or experimented with it?I'd love to hear what you guys think.
