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

Can't get pure() actions to work #1014

Closed
semopz opened this issue Feb 21, 2020 · 3 comments
Closed

Can't get pure() actions to work #1014

semopz opened this issue Feb 21, 2020 · 3 comments

Comments

@semopz
Copy link

semopz commented Feb 21, 2020

Description
Using pure() in xstate 4.7.8 seems to just throw errors or log warnings. Tried using it in event actions and state node entry and get the same result.

Got usage instructions from a discussion that I didn't want to hijack.

Expected Result
When I return an assign() action from pure(), I expect the context to be updated accordingly.

Actual Result
Following warning is raised and context does not get updated:

Warning: No implementation found for action type 'xstate.assign'

Reproduction
https://codesandbox.io/s/xstate-typescript-template-qzzhm
Additional context
xstate 4.7.8

@semopz semopz added the bug label Feb 21, 2020
@davidkpiano davidkpiano removed the bug label Feb 21, 2020
@davidkpiano
Copy link
Member

Please keep in mind that pure() is still being developed and not part of public API yet. I'll look into this.

@Andarist
Copy link
Member

Seems like the problem is that returned actions from pure are not resolved. It should be an easy fix.

@davidkpiano
Copy link
Member

Cannot reproduce with latest XState (4.16.2)

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

No branches or pull requests

3 participants