Last year, I worked on a side project. It was a React app that integrated the Google Places API. In one point I needed global state and using Redux was no.
Also, React Context didn't work because I needed a JavaScript object in another page. My use case was very simple and adding Redux was overcomplicating the app.
What did I found? duix. This is a package that helps managing state in the very precise way without all the boilerplate Redux adds 😅
It was easy to use (for me) and in the end helped me with the specific case I was facing. It is no longer maintained but it shows that a simpler state management is possible. 👍🏽
I am a certified trainer that likes to share my knowledge with the world.
Also, I am an adopter of continuous learning and evolving idea.
https://dev.to/wolfiton/who-am-i-3lj7
Saw the update to the post. Go ahead with state machines. Try as much as you can to understand them and see how they could benefit the UIs you build.
In the project I worked we have three different apps.
The first one had its UI built with React and state management was done with Redux.
The second one is a combo of React, MobX, TypeScript, and XState
Third one, same as previous.
This guy couldn't be happier, calmer, and doing stuff faster with the MobX, TypeScript, XState stack. He called stuff with Redux "Mental Gymnastics" xD
I am a certified trainer that likes to share my knowledge with the world.
Also, I am an adopter of continuous learning and evolving idea.
https://dev.to/wolfiton/who-am-i-3lj7
Thanks for the quick follow up @franciscoquintero,
I will probably try a simple app with Xstate first to see how the data flows and see what states I will have to take into account, besides "idle".
Update: Did your friend tested his code after using Xstate with Jest, is it even possible?
Hi @wolfiton
Last year, I worked on a side project. It was a React app that integrated the Google Places API. In one point I needed global state and using Redux was no.
Also, React Context didn't work because I needed a JavaScript object in another page. My use case was very simple and adding Redux was overcomplicating the app.
What did I found? duix. This is a package that helps managing state in the very precise way without all the boilerplate Redux adds 😅
It was easy to use (for me) and in the end helped me with the specific case I was facing. It is no longer maintained but it shows that a simpler state management is possible. 👍🏽
Thanks for sharing @franciscoquintero, your experience and the detailed reasons why you chose duix.
I really appreciate it.
Saw the update to the post. Go ahead with state machines. Try as much as you can to understand them and see how they could benefit the UIs you build.
In the project I worked we have three different apps.
This guy couldn't be happier, calmer, and doing stuff faster with the MobX, TypeScript, XState stack. He called stuff with Redux "Mental Gymnastics" xD
Thanks for the quick follow up @franciscoquintero,
I will probably try a simple app with Xstate first to see how the data flows and see what states I will have to take into account, besides
"idle"
.Update: Did your friend tested his code after using Xstate with Jest, is it even possible?
Yes. He tested his code. In his opinion, it was easier because state machines are more predictable.
He used React Testing Library and Cypress. I think one of those tools made the testing part easier for him. I will ask him :)