Skip to content

v3.5.0

Choose a tag to compare

@github-actions github-actions released this 15 Mar 07:11
· 195 commits to main since this release

3.5.0 (2022-03-15)

Features

  • add .hasTag(), .matches(), and .broadcast() APIs (#41) (108ec3e)

Feature Explanations

  • .broadcast(), to send an event to all of the machines, allowing you to not use autoforward
  • .hasTag() calls the built-in xstate .hasTag() API against all the cached state objects (stopping at the first successful one)
  • .matches() calls the built-in xstate .matches() API against all the cached state objects (stopping at the first successful one)

NOTE: Not a breaking change because the public API didn't meaningfully shift, but the internals of xstate-component-tree have been significantly changed in this release. Instead of invoking a new ComponentTree class for every child machine it now tracks them all without any need for recursion or new class instances. Should be a bit lighter at run-time as a result.