Skip to content

Conversation

@github-actions
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

xstate-component-tree@5.0.0

Major Changes

  • #69 b6c9fc8 Thanks @tivac! - Always provide a valid initial value to subscribers

    Previously if you called the .subscribe() method on a ComponentTree instance before the statechart had been processed the return value would be false. This meant that subscribers would have to add checks to do anything against the returned value, since they couldn't depend on the .matches/.hasTag/.broadcast APIs existing.

    This change fixes that, and ensures that even if the statechart hasn't been walked yet the initial value stored has all the expected APIs, along with a reasonable value for the tree property of []. There isn't a great fallback value for .state at this time though.

@tivac tivac merged commit df60219 into main Jun 28, 2022
@tivac tivac deleted the changeset-release/main branch June 28, 2022 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants