Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 17, 2025

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/store@3.11.0

Minor Changes

  • #5393 6d00d3f Thanks @davidkpiano! - Add snapshot parameter to getTransactionId function.

    const store = createStore(
      undo(
        {
          // ...
        },
        {
          getTransactionId: (event, snapshot) =>
            snapshot.context.currentTransactionId
        }
      )
    );
  • #5392 5854b52 Thanks @davidkpiano! - Added an overload to useSelector that allows you to select the entire snapshot:

    // No selector provided, return the entire snapshot
    const snapshot = useSelector(store);
  • #5393 6d00d3f Thanks @davidkpiano! - Add skipEvent option to undoRedo() to exclude certain events from undo/redo history.

    const store = createStore(
      undoRedo(
        {
          context: { count: 0 },
          on: {
            inc: (ctx) => ({ count: ctx.count + 1 }),
            log: (ctx) => ctx // No state change
          }
        },
        {
          skipEvent: (event, snapshot) => event.type === 'log'
        }
      )
    );

@github-actions github-actions bot force-pushed the changeset-release/main branch from 8447ce5 to 2fbe172 Compare October 17, 2025 15:04
@davidkpiano davidkpiano merged commit 3bbfad3 into main Oct 17, 2025
@davidkpiano davidkpiano deleted the changeset-release/main branch October 17, 2025 15:08
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.

1 participant