Skip to content

[Feature] @xstate/react: support React's transition API #5073

Answered by Andarist
bsunderhus asked this question in Ideas
Discussion options

You must be logged in to vote

The problem can be surfaced by consuming the actorRef elsewhere. Tearing can happen when you consume the same external data source in multiple places when each is coordinated outside of React. That's why I'm saying that returning actorRef makes it impossible~ to avoid tearing. Since we return it, we allow other consumers that won't sync through the returned snapshot (and thus through React's own scheduling). Any other piece of code is free to use that returned actorRef, subscribe to it and thus introduce tearing.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@bsunderhus
Comment options

@bsunderhus
Comment options

@Andarist
Comment options

Answer selected by bsunderhus
@bsunderhus
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants