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@5.14.0
Minor Changes
#4936c58b36dc3 Thanks @davidkpiano! - Inspecting an actor system via actor.system.inspect(ev => …) now accepts a function or observer, and returns a subscription:
const actor = createActor(someMachine);
const sub = actor.system.inspect((inspectionEvent) => {
console.log(inspectionEvent);
});
// Inspection events will be logged
actor.start();
actor.send({ type: 'anEvent' });
// ...
sub.unsubscribe();
// Will no longer log inspection events
actor.send({ type: 'someEvent' });
#49429caaa1f70 Thanks @boneskull! - DoneActorEvent and ErrorActorEvent now contain property actorId, which refers to the ID of the actor the event refers to.
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@5.14.0
Minor Changes
#4936
c58b36dc3
Thanks @davidkpiano! - Inspecting an actor system viaactor.system.inspect(ev => …)
now accepts a function or observer, and returns a subscription:#4942
9caaa1f70
Thanks @boneskull! -DoneActorEvent
andErrorActorEvent
now contain propertyactorId
, which refers to the ID of the actor the event refers to.#4935
2ac08b700
Thanks @davidkpiano! - All actor logic creators now support emitting events:Promise actors
Transition actors
Observable actors
Callback actors
Patch Changes
417f35a11
Thanks @boneskull! - Expose typeUnknownActorRef
for use when callinggetSnapshot()
on an unknownActorRef
.