Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

Simplify implementation with design for react async #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

SamyPesse
Copy link
Member

This PR simplifies the unstated implementation to work with async rendering of react.

It fixes potential warning when using unstated with react async when setState is done on an unmounted component (it happens when the component is being rendered on a branch then cancelled before commit). Basically it ensures the subscribes is done in an effect.

It also removes the async/batching done in unstated.

Breaking changes:

  • setState is now sync

@SamyPesse SamyPesse marked this pull request as ready for review November 27, 2019 14:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant