Skip to content

Bug: Using actor.send outputs a warning that assign is not imperative when sent to an actor using enqueueActions #5343

@MarjanDB

Description

@MarjanDB

XState version

XState version 5

Description

Coming from: statelyai/docs#469
I initially thought this was expected, but looks like it's not... so I'm opening an issue here.

I left a test in you can run:
Image

This line is using self.send, but using enqueue.sendTo(self, …) will also produce the same warning.

Expected result

There should be no warning.

Actual result

I'm getting a warning that custom actions should not call assign

Reproduction

https://github.com/MarjanDB/xstate-minimal-reproduce

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions