@koordinates/xstate-tree 4.1.1 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/xstateTree.js +1 -2
- package/package.json +1 -1
package/lib/xstateTree.js
CHANGED
|
@@ -112,8 +112,7 @@ export function XstateTreeView({ interpreter }) {
|
|
|
112
112
|
const { slots: interpreterSlots } = interpreter.machine.meta;
|
|
113
113
|
const slots = useSlots(interpreter, interpreterSlots.map((x) => x.name));
|
|
114
114
|
const canHandleEvent = useCallback((e) => {
|
|
115
|
-
|
|
116
|
-
return (_a = interpreter.nextState(e).changed) !== null && _a !== void 0 ? _a : false;
|
|
115
|
+
return interpreter.getSnapshot().can(e);
|
|
117
116
|
}, [interpreter]);
|
|
118
117
|
const inState = useCallback((state) => {
|
|
119
118
|
var _a, _b;
|
package/package.json
CHANGED