Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matthewp/robot
🤖 A functional, immutable Finite State Machine library
https://github.com/matthewp/robot
Last synced: 4 months ago
JSON representation
🤖 A functional, immutable Finite State Machine library
- Host: GitHub
- URL: https://github.com/matthewp/robot
- Owner: matthewp
- License: bsd-2-clause
- Created: 2019-09-09T11:44:29.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-12-04T11:03:35.000Z (7 months ago)
- Last Synced: 2024-01-15T10:24:11.112Z (5 months ago)
- Language: JavaScript
- Homepage: https://thisrobot.life
- Size: 925 KB
- Stars: 1,864
- Watchers: 18
- Forks: 87
- Open Issues: 30
-
Metadata Files:
- Readme: readme.md
- Contributing: contributing.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Lists
- awesome-react-state-management - robot - A functional, immutable Finite State Machine library (List)
- awesome-fsm - Robot
- awesome-stars - robot
- awesome-stars - robot
- awesome-stars - robot
- awesome-stars - robot
- awesome-fsm - Robot
- awesome - robot - 🤖 A functional, immutable Finite State Machine library (JavaScript)
- awesome-stars - robot
- awesome-stars - matthewp/robot - 🤖 A functional, immutable Finite State Machine library (others)
README
# Robot
![]()
A small functional and immutable Finite State Machine library. Using state machines for your components brings the declarative programming approach to application state.
See [thisrobot.life](https://thisrobot.life/) for the main documentation.
```js
import { createMachine, interpret, state, transition } from 'robot3';let machine = createMachine({
off: state(
transition('toggle', 'on')
),
on: state(
transition('toggle', 'off')
)
});const service = interpret(machine, () => {
render();
});
```## 📚 [Documentation](https://thisrobot.life/)
* Please star [the repository](https://github.com/matthewp/robot) on GitHub.
* [File an issue](https://github.com/matthewp/robot/issues) if you find a bug. Or better yet...
* [Submit a pull request](https://github.com/matthewp/robot/compare) to contribute.## Testing
Tests are located in the `test/` folder. Load `test/test.html` in your browser of choice with any HTTP server you like (I use [http-server](https://www.npmjs.com/package/http-server)). Tests are written in [QUnit](https://qunitjs.com/) and are simple to understand.
## Integrations
Robot works with a variety of UI libraries, and includes integrations for React, Preact, Haunted, and more. See the [integrations page](https://thisrobot.life/integrations.html) to learn more.
## License
BSD-2-Clause