Derek Duncan

Results comments of Derek Duncan

@jmakeig It looks like that error may be because "A" does not have an "initial" property defined? On a slightly unrelated note, it would be great to allow guards for...

Thanks @coodoo, that helps! My feedback now is that when using xstate, it would be helpful to have spawned/invoked elements either always be an `Interpreter` or an `Actor`. e.g. the...

I haven't tried it yet, but doesn't `{ sync: true }` to `spawn` allow you to read state? Maybe `invoke`'d actors get `{ sync: true }` by default and other...

This reported TS error was the symptom that lead to my questions in #672: > Finally, most of these concepts trickle out as confusing when you start to use the...

@DirkWolthuis Looks like `useService` works with `spawn` in 4.7.0, and it's just TS that doesn't like it. Take a look at the Todo example upgraded to 4.7 https://codesandbox.io/s/xstate-todomvc-oj9ve. But I'm...

@davidkpiano not sure if it helps, but I think `state/current` is undefined initially because, for some reason, `assign` actions that are calling `spawn` are getting called twice in a row...

Ah, the [above issue](https://github.com/davidkpiano/xstate/issues/772#issuecomment-551890910) is fixed by #758 so that the warning is gone and the initial call produces an `Interpreter`. The entry action is still called twice but that...

About items two and four, [we discussed some ideas in the chat](https://gitter.im/statecharts/statecharts?at=5e6a6f3d02dbe022a181b1ad) with using event busses and messaging/subscribing to spawned actors.

More information and discussion around two and four [in this post](https://spectrum.chat/statecharts/general/faq-for-managing-hierarchy-of-xstate-actors-in-react~23ed85e9-4fda-4522-826d-97d301b500ba).

I've experienced this problem many times. I believe it may be related to flow being unable to infer types for exports. See https://flowtype.org/docs/modules.html#missingrequired-annotations