redux-xstate-poc
inertia
Our great sponsors
redux-xstate-poc | inertia | |
---|---|---|
6 | 121 | |
89 | 5,735 | |
- | 1.9% | |
2.6 | 7.9 | |
over 2 years ago | 7 days ago | |
TypeScript | PHP | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
redux-xstate-poc
-
JavaScript State Machines and Statecharts
Very doable, but not the most ideal syntax, since `createSlice` is focused on "here's an action / thing that happened, here's the reducer that handles that".
On the flip side, you can also use XState state machines as Redux reducers. A state machine is, after all, a function that takes a current state value + some event, and returns a new state.... exactly the same as a reducer function!
David and I have been saying for a while that we'd like to have a more official integration between XState and Redux. A while back, Matt Pocock put together an proof of concept for what a `createXStateSlice` might look like [1]. I actually sat down with David a couple weeks ago and we did some further design discussions about the possibility of using the `@xstate/fsm` package (a smaller version of XState's logic) as a starting point, and generating RTK actions based on that. No code yet, but it seems feasible.
[0] https://dev.to/davidkpiano/redux-is-half-of-a-pattern-1-2-1h...
[1] https://github.com/mattpocock/redux-xstate-poc
-
The new wave of React state management
Fun fact: one of the XState devs did a proof-of-concept showing how to use XState state machines as Redux reducers and integrate the side effects handling as a middleware:
https://github.com/mattpocock/redux-xstate-poc
We'd like to work together to turn that into a more official integration sometime soon.
- Writing React components with State Machines.
-
What does a large XState / Robot3 / FSM-based application architecture look like?
One of the XState devs recently posted https://github.com/mattpocock/redux-xstate-poc , an example of how you can integrate XState into a Redux app for use as a Redux slice reducer + side effects middleware
- @xstate/redux: Official proposal for an XState middleware for Redux
inertia
-
Should I rebuild my web app as an SPA?
You mention that implementing Vue with Laravel is a headache but without mentioning what kind of issues you have had? Have you looked into using Inertia.js? (https://inertiajs.com/)
- where can I find information about using vue and php together?
-
Up-to-date methods of using Vue with Laravel in a non-SPA way?
Inertia is what you're looking for, works great!
-
Ask HN: What are some unpopular technologies you wish people knew more about?
Don't know if https://inertiajs.com can be classified as unpopular. but I think it's one of the best web solution combining the best of the both worlds ssr and spa.
-
SQLSync – Stop Building Databases
But, if I can be honest, solutions such as Hotwire or Livewire are not as snappy as a SPA.
I personally prefer [InertiaJs](https://inertiajs.com), which is some kind of front-end router system with its state synced with the server in an "old style" fashion.
- Build single-page apps, without building an API
- InertiaJs: Build single-page apps, without building an API
-
An Internet of PHP
[2] https://inertiajs.com/
- Inertia.js – The Modern Monolith
- InertiaJS – Single-page apps, without building an API
What are some alternatives?
yieldmachine - Components for State Machines, using Generator Functions
laravel-pwa - Looks like an app, feels like an app, but IS NOT an app.
devtools - Replay.io DevTools
vite - Next generation frontend tooling. It's fast!
vuex - 🗃️ Centralized State Management for Vue.js.
astro - The web framework for content-driven websites. ⭐️ Star to support our work!
Dn-FamiTra
htmx - </> htmx - high power tools for HTML
rfcs - RFCs for XState and Stately tools
Vue.js - This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
redux-easy-mode - A very easy to understand and use set of tools for Redux. Includes action builders, reducer builders, side-effect middleware, and async actions.
vercel - Develop. Preview. Ship.