yieldmachine icon indicating copy to clipboard operation
yieldmachine copied to clipboard

Components for State Machines, using Generator Functions

Results 34 yieldmachine issues
Sort by recently updated
recently updated
newest added

Instead of context we have WebAssembly.Memory Instead of props we have imports. Instead of "current state" we have exports. Perhaps multiple wasm instances (or other state machines) can be synced...

https://buttondown.email/htmhell/archive/issue-21-closing-dialogs/

Can be plugged into any machine. Would support an `assign` event.

Before: ```js import { start } from "yieldmachine"; function TrafficLights() { function* Red() { yield on("timer", Green); } function* Green() { yield on("timer", Yellow); } function* Yellow() { yield on("timer",...

Declare state machines using components. YieldMachine is an opinionated library for creating state machines and actors. JavaScript Generator functions allow rich behaviour to be declared and composed together. And its...

```ts function reducer(previousState: State, event: React.FormEvent | React.MouseEvent): State { return previousState.machine.next(event); } ``` ## `eventsReducer(machine)` It wouldn’t support side effects and listening/emitting to events (e.g. with `listenTo()`). ```js import...

See: https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/formdata_event ```js const formElem = document.querySelector('form'); // submit handler formElem.addEventListener('submit', (e) => { // on form submission, prevent default e.preventDefault(); console.log(form.querySelector('input[name="field1"]')); // FOO console.log(form.querySelector('input[name="field2"]')); // BAR // construct a...

https://github.com/statelyai/xstate/releases/tag/%40xstate%2Freact%401.5.0

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) Welcome to [Renovate](https://togithub.com/renovatebot/renovate)! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin. 🚦 To activate Renovate, merge this Pull Request....

- Could be used to order events. - Attach a logical clock to every event. - https://en.wikipedia.org/wiki/Lamport_timestamp