You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Utility method to wrap up an [XState](https://xstate.js.org)interpreter and read state meta information so your statechart can be used to create a tree of components to render.
3
+
Utility method to wrap up an [XState](https://xstate.js.org)actor and read state meta information so your statechart can be used to create a tree of components to render.
The second argument to the function will be called every time the machine transitions. It will pass the callback a new object representing all the views defined on currently active states, all correctly nested to match the structure of the statechart. Each element in the response will also contain a `path` value corresponding to the the specific state the object represents.
78
78
79
79
```js
80
-
newComponentTree(service, (tree) => {
80
+
newComponentTree(actor, (tree) => {
81
81
/**
82
82
*
83
83
* tree will be something like this
@@ -211,9 +211,9 @@ import { component } from "xstate-component-tree/component";
Calls the xstate `.send()` method on every running interpreter in the hierarchy. This is especially useful to avoid the use of the `autoforward` option on all of your invoked child machines.
241
241
242
-
-`eventName` is a string event to be sent
243
242
-`eventObject` is an object with a `type` property of the event name, along with other optional fields
244
243
-`payload` is an object of optional fields to be added to the event object
245
244
246
-
#### `.can(eventName | eventObject)`
245
+
#### `.can(eventObject)`
247
246
248
247
Calls the xstate `.can()` method on every running interpreter in the hierarchy.
249
248
250
-
-`eventName` is a string event to be sent
251
249
-`eventObject` is an object with a `type` property of the event name, along with other optional fields
0 commit comments