Skip to content

Conversation

@dependabot-preview
Copy link
Contributor

Bumps @xstate/react from 0.8.1 to 1.5.1.

Release notes

Sourced from @​xstate/react's releases.

@​xstate/react@​1.5.1

Patch Changes

  • 453acacb #2389 Thanks @​davidkpiano! - An internal issue where the spawnBehavior import for the useSpawn(...) hook was broken internally has been fixed.

@​xstate/react@​1.5.0

Minor Changes

  • 432b60f7 #2280 Thanks @​davidkpiano! - Just like useInterpret(...), other types of actors can now be spawned from behaviors using useSpawn(...):

    import { fromReducer } from 'xstate/lib/behaviors';
    import { useActor, useSpawn } from '@xstate/react';
    type CountEvent = { type: 'INC' } | { type: 'DEC' };
    const countBehavior = fromReducer(
    (count: number, event: CountEvent): number => {
    if (event.type === 'INC') {
    return count + 1;
    } else if (event.type === 'DEC') {
    return count - 1;
    }
    return count;
    
    },
    0 // initial state
    );
    const Component = () => {
    const countActorRef = useSpawn(countBehavior);
    const [count, send] = useActor(countActorRef);
    return (
    <div>
    Count: {count}
    <button onClick={() => send({ type: 'INC' })}>Increment</button>
    <button onClick={() => send({ type: 'DEC' })}>Decrement</button>
    </div>
    );
    };

@​xstate/react@​1.4.0

Minor Changes

  • 849ec56c #2286 Thanks @​davidkpiano! - The useService(...) hook will be deprecated, since services are also actors. In future versions, the useActor(...) hook should be used instead:

    -const [state, send] = useService(service);

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

@dependabot-preview dependabot-preview bot added the dependencies Pull requests that update a dependency file label Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant