title: What is an actual difference between redux and a state machine (e.g. xstate)?
body: <p>I am working on investigation of one front-end application of medium complexity. At this moment it is written in pure javascript, it has a lot of different event-based messages connecting few main parts of this application.</p>
  
  <p>We decided that we need to implement some kind of state container for this application in scope of further refactoring. Previously I had some experience with redux and ngrx store (which actually follows the same principles).</p>
  
  <p><a href="https://redux.js.org/" rel="noreferrer">Redux</a> is an option for us, but one of the developers proposed using a state-machine based library, in particular the <a href="https://xstate.js.org/docs/" rel="noreferrer">xstate library</a>.</p>
  
  <p>I've never worked with xstate, so I found it interesting and started reading documentation and looking at different examples. Looked promising and powerful, but at some point I understood that I don't see any significant difference between it and redux. </p>
  
  <p>I spent hours trying to find an answer, or any other information comparing xstate and redux. I didn't find any clear information, except some articles like <a href="http://krasimirtsonev.com/blog/article/getting-from-redux-to-state-machine-with-stent" rel="noreferrer">"get from redux to a state machine"</a>, or links to libraries focused on using redux and xstate <strong>together</strong> (quite weird).</p>
  
  <p>If someone can describe the difference or tell me when developers should choose xstate - you are welcome to.</p>