Mateusz Burzyński
Mateusz Burzyński
The bug is caused by the "incorrect" behavior that was implemented in XState long time ago (IIRC it should already be fixed in v5). When entering a final state we...
@davidkpiano we only need to add more changesets here, but please don't merge this into `v5/interpret-all-behaviors` just yet - let's land that PR first and only then land this onto...
Thank you for those! This is an awesome contribution. I'm gonna get to fixing those soon.
This is a bigger problem with the current implementation. Unfortunately, we don't wrap observables - we just pass them around directly right now (this is already solved in v5, at...
This is expected - typegen generates some extra data to aid **inference**. Inference only works when the contextual type can flow into an expression. In your case, `incrementCount` is already...
This does the trick: Possible patch that utilizes `MachineOptionsFrom` ```diff diff --git a/src/machines/actions.ts b/src/machines/actions.ts index e941abc..90a8133 100644 --- a/src/machines/actions.ts +++ b/src/machines/actions.ts @@ -1,7 +1,9 @@ -import { assign } from...
You might have forgotten to save the codesandbox. It doesn't contain any `assign` action right now.
This is the only, hacky, solution that I know: https://www.typescriptlang.org/play?ts=4.8.2#code/JYWwDg9gTgLgBAbwFBzgQwM4eAcwHYA0KcAxlAKZozkCyaJAFsHuUagIJa4tRtwAKUCGHKwAnp2z5RfAKIA3cnhgB5AEYArciRh92O4BDzqtOogF84AMyEg4AIgAeGGFXL2A3EiTNqUK-TkcDQSXPj6MIZ4ADwAKgDCRtSOunCxCkrw5ClKACYYcBnKJtowAHzE2dR4+XARUSU6cYnKVQRpReWIxDBiIgBcDs6u1AB0mFJ4nsQT3CCZg5Lcos1JbR2KymVwAD4CQiLiS9JQq60p7emb5V6oAPR3cDBMBcAFz0FGADZiT0x4OD+VDgDEwcDU5CU6FyuXIuXQNTgwBgAHICmgQfQANbEB5-IIUDAAVy+8AgVnxcAABrN8FSkQU8BB4CQ0F8vmg1F8gsw4BQ2cixMQABQkNYpQYJcWpcjXSWdACUg3kEGAuS85m8ViJeAMRjgIFCkzOyVSV0ycCqeQKnUa5WFMzCPEWTpWUvOZs62z2gmEol6xx4JvW5q2SCVwSN3HqRmDFw2mW2yFQFBgRKgeHQTuFtJ4CqzCLEGu8ZEo1DojGY5GFybgGEY5BAaEGtdQYo9gxrljBOqxTIA7nh82CEHB5GyieRBngiSAIVA4OY+KhZZkMJ2EN2Cr2B0OC6PegMHMxS-NlPZF3wl8R26aW8RUOOvpPBgBGK98ZjI4Bswb2NXcvYfAuG467dKgqAAVO4EQagRj3rBsEnhQZ4wAhiGwfQkRGGBhqBjWD4YRBT4vnAorSu0q7KPmAC82y3lUowkUEADUcDvoRGHmAqy6IdeXG8fxl5INxXhAA
This is a heuristic baked into TypeScript's inference algorithm - functions might be treated a little bit differently at times. So by adding a hacky callable signature to this we...
> In a sense, this question isn't worth debating yet because I don't think React currently provides an API (even an experimental one) to stay subscribed while in a hidden...