Skip to content

robot3@1.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 05 Oct 01:15
bde0465

Minor Changes

  • 6b7bc17: Reducers and actions can now be passed to state(), and run whenever the machine enters that state.

    const machine = createMachine({
      loading: state(
        reduce((ctx) => ({ ...ctx, error: null })),
        action(showSpinner),
        transition("done", "loaded")
      ),
      loaded: state(),
    });

    Entry reducers and actions run after the reducers of the transition that led into the state, before the state's immediates are checked, and not on a transition from a state to itself.

Patch Changes

  • 17b2ab2: Fix immediate() widening a machine's send() event type to string