Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

withContext duplicates invokes for services [4.6.1] #491

Closed
maciekkus opened this issue Jun 14, 2019 · 0 comments
Closed

withContext duplicates invokes for services [4.6.1] #491

maciekkus opened this issue Jun 14, 2019 · 0 comments

Comments

@maciekkus
Copy link

Bug

Description:

When withContext is called on Machine object, interpreter triggers twice all services invoked on states.
Issue reproduced here: https://codesandbox.io/s/xstate-withconfig-bug-lbkny

Expected result:

services (promises) attached to states should be triggered once

(Bug) Actual result:

services (promises) attached to states are triggered twice.
if withContext call are chained like: .withContext({}).withContext({}) actions will be tripled.

(Bug) Potential fix:

Potential fix for now for this is to downgrade to 4.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant