Xstate: Allow autoForwarding of events to spawned actors

Created on 15 Jun 2019  路  1Comment  路  Source: davidkpiano/xstate

Bug or feature request?

Feature

Description:

Since spawn essentially wraps an invoke element, allow passing in the attribute autoForward so that events can be sent to spawned actors.

(Feature) Potential implementation:

Should be fairly straight forward and If I get time i'll submit a pull request for this feature. In the mean time this will be a reminder.
Required! If you would like to see a feature or enhancement make its way to xstate, please describe:

  • What the API would look like
spawn(SomeMachine, {autoForward: true});
  • Is this is a breaking change
    No
  • If this is part of the existing SCXML specification
    It is part of the invoke specification and currently implemented with the invoke property of a state.
    You can use CodePen or Code Sandbox to create a reproduction/POC.
enhancement

Most helpful comment

Just letting you know - I have started working on this one.

>All comments

Just letting you know - I have started working on this one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kurtmilam picture kurtmilam  路  3Comments

greggman picture greggman  路  3Comments

dakom picture dakom  路  3Comments

carloslfu picture carloslfu  路  3Comments

bradwoods picture bradwoods  路  3Comments