-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate
send()
action creator (#3393)
* Deprecate send * Update types + tests * Ensure that sendTo handles self-events (and other fixes) * Add warnings * Add test to read from event * Refactor * Revert refactor * Refactor a different way * Add delay support * Update packages/core/test/actions.test.ts Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com> * Update packages/core/test/actions.test.ts Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com> * Update packages/core/test/actions.test.ts Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com> * Update docs * Fix tests * Add test for 0 delay * Stop reusing `send` in `raise` (#3790) * Stop reusing `send` in `raise` * Fixed `actionToSCXML` for `raise` * More tests * Create modern-frogs-wave.md --------- Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
- Loading branch information
1 parent
76aeffc
commit 430986c
Showing
17 changed files
with
502 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"xstate": minor | ||
--- | ||
|
||
Deprecated `send()` action creator. Instead of that, you can use `sendTo()` to send events to other actors and `raise()` to send events to the "self" actor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
--- | ||
"xstate": patch | ||
'xstate': patch | ||
--- | ||
|
||
Fixed inference for `assign` using `PropertyAssigner`, like here: | ||
|
||
```ts | ||
actions: assign({ | ||
counter: 0, | ||
delta: (ctx, ev) => ev.delta, | ||
}) | ||
delta: (ctx, ev) => ev.delta | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.