Minor Changes
-
#5299
ca8306fThanks @Uniqen! - Addactor.select(selector, equalityFn?)method to derive aReadable<TSelected>from an actor's snapshot. The returned object has.subscribe()(only emits when the selected value changes, usingObject.isby default) and.get()for synchronous access.const actor = createActor(machine); actor.start(); const count = actor.select((snap) => snap.context.count); count.get(); // current value count.subscribe((value) => { console.log(value); // only fires when count changes });