Minor Changes
-
#5493
871857dThanks @davidkpiano! - Add afilterEventsoption toxstate/graphtraversal helpers and
createTestModel(...)to control which events should be explored from each
state.This makes it possible to opt into enabled-only traversal for machine snapshots,
such as when you only want to explore events that currently pass guards:import { createTestModel } from 'xstate/graph'; const model = createTestModel(machine); const paths = model.getSimplePaths({ filterEvents: (state, event) => state.can(event) });