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

Version Packages #4740

Merged
merged 1 commit into from
Feb 12, 2024
Merged

Version Packages #4740

merged 1 commit into from
Feb 12, 2024

Conversation

github-actions[bot]
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/react@4.1.0

Minor Changes

  • #4231 c2402e7bc Thanks @davidkpiano! - The actor passed to useSelector(actor, selector) is now allowed to be undefined for an actor that may not exist yet. For actors that may be undefined, the snapshot provided to the selector function can also be undefined:

    const count = useSelector(maybeActor, (snapshot) => {
      // `snapshot` may be undefined
      return snapshot?.context.count;
    });
    
    count; // number | undefined

@xstate/vue@3.1.0

Minor Changes

  • #4231 c2402e7bc Thanks @davidkpiano! - The actor passed to useSelector(actor, selector) is now allowed to be undefined for an actor that may not exist yet. For actors that may be undefined, the snapshot provided to the selector function can also be undefined:

    const count = useSelector(maybeActor, (snapshot) => {
      // `snapshot` may be undefined
      return snapshot?.context.count;
    });
    
    count; // number | undefined

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit efc715d:

Sandbox Source
XState Example Template Configuration
XState React Template Configuration

@davidkpiano davidkpiano merged commit b5d40d8 into main Feb 12, 2024
1 check passed
@davidkpiano davidkpiano deleted the changeset-release/main branch February 12, 2024 23:34
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.

None yet

1 participant