Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@xstate/store] v3 #5175

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

[@xstate/store] v3 #5175

wants to merge 6 commits into from

Conversation

davidkpiano
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Jan 22, 2025

🦋 Changeset detected

Latest commit: 73c9489

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@xstate/store Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

davidkpiano and others added 3 commits January 21, 2025 21:29
- Added `StoreEffect` type to support both emitted events and side effects.
- Updated `createStoreTransition` to return effects instead of emitted events.
- Modified `receive` function to handle effects, executing functions or emitting events accordingly.
- Added a test case to verify that effects can be enqueued and executed after state updates.

This change improves the flexibility of the store's event handling mechanism.
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