{"id":13452176,"url":"https://github.com/krasimir/stent","last_synced_at":"2025-04-08T11:16:33.900Z","repository":{"id":42207301,"uuid":"100495929","full_name":"krasimir/stent","owner":"krasimir","description":"Stent is combining the ideas of redux with the concept of state machines","archived":false,"fork":false,"pushed_at":"2020-08-24T05:29:23.000Z","size":750,"stargazers_count":689,"open_issues_count":9,"forks_count":30,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-01T10:17:54.491Z","etag":null,"topics":["finite","machine","mealy-machine","state"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krasimir.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-16T14:04:15.000Z","updated_at":"2025-01-03T01:58:42.000Z","dependencies_parsed_at":"2022-07-10T03:46:46.323Z","dependency_job_id":null,"html_url":"https://github.com/krasimir/stent","commit_stats":null,"previous_names":["krasimir/mealy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krasimir%2Fstent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krasimir%2Fstent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krasimir%2Fstent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krasimir%2Fstent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krasimir","download_url":"https://codeload.github.com/krasimir/stent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247829512,"owners_count":21002997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["finite","machine","mealy-machine","state"],"created_at":"2024-07-31T07:01:16.026Z","updated_at":"2025-04-08T11:16:33.873Z","avatar_url":"https://github.com/krasimir.png","language":"JavaScript","readme":"![Stent - brings the power of state machines to the web](./_logo/logo.gif)\n\nStent is combining the ideas of [Redux](http://redux.js.org/) with the concept of [state machines](https://en.wikipedia.org/wiki/Automata_theory).\n\n![Travis](https://travis-ci.org/krasimir/stent.svg?branch=master)\n[![npm downloads](https://img.shields.io/npm/dm/stent.svg?style=flat-square)](https://www.npmjs.com/package/stent)\n\nChat: https://gitter.im/stentjs\n\n---\n\n## A few words about state machines\n\nState machine is a mathematical model of computation. It's an abstract concept where the machine may have different states but at a given time fulfills only one of them. It accepts input and based on that (plus its current state) transitions to another state. Isn't it familiar? Yes, it sounds like a front-end application. That's why this model/concept applies nicely to UI development.\n\n*Disclaimer: there are different types of state machines. I think the one that makes sense for front-end development is [Mealy state machine](https://en.wikipedia.org/wiki/Mealy_machine).*\n\n## Installation\n\nThe library is available as a [npm module](https://www.npmjs.com/package/stent) so `npm install stent` or `yarn add stent` will do the job. There's also a standalone version [here](./standalone) (only core functionalities) which you can directly add to your page.\n\n## Documentaion\n\n* [Getting started](./docs/getting-started.md)\n* API\n  * [`\u003cstate object\u003e`](./docs/state-object.md)\n  * [`Machine.\u003capi method\u003e`](./docs/machine.md)\n  * [`\u003caction-handler\u003e`](./docs/action-handler.md)\n  * [`connect` and `disconnect`](./docs/connect-and-disconnect.md)\n  * [Middlewares](./docs/middlewares.md)\n  * [React integration](./docs/react-integration.md)\n* [examples](./docs/examples.md)\n\n## Debugging apps made with Stent\n\nStent is supported by [Kuker](https://github.com/krasimir/kuker) Chrome extension. Just add the [Stent emitter](https://github.com/krasimir/kuker#integration-with-stent) to your app and open the [Kuker](https://github.com/krasimir/kuker) tab in Chrome's DevTools.\n\n![Kuker](https://github.com/krasimir/kuker/raw/master/img/kuker-emitters/screenshot_stent.jpg)\n\n## Must-read articles/resources\n\n* [The Rise Of The State Machines](https://www.smashingmagazine.com/2018/01/rise-state-machines/)\n* [You are managing state? Think twice.](http://krasimirtsonev.com/blog/article/managing-state-in-javascript-with-state-machines-stent) - an article explaining why finite state machines are important in the context of the UI development.\n* [Getting from Redux to a state machine](http://krasimirtsonev.com/blog/article/getting-from-redux-to-state-machine-with-stent) - a tutorial that transforms a Redux app to an app using Stent\n* [Robust React User Interfaces with Finite State Machines](https://css-tricks.com/robust-react-user-interfaces-with-finite-state-machines/)\n* [Mealy state machine](https://en.wikipedia.org/wiki/Mealy_machine)\n\n## Other libraries dealing with state machines\n\n* [xstate](https://github.com/davidkpiano/xstate)\n* [machina](http://machina-js.org/)\n","funding_links":[],"categories":["JavaScript","Libraries","List"],"sub_categories":["JavaScript"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrasimir%2Fstent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrasimir%2Fstent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrasimir%2Fstent/lists"}