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

Tearing! #31

Closed
csr632 opened this issue Dec 3, 2020 · 5 comments
Closed

Tearing! #31

csr632 opened this issue Dec 3, 2020 · 5 comments

Comments

@csr632
Copy link
Contributor

csr632 commented Dec 3, 2020

https://codesandbox.io/s/use-context-selector-tears-hx1qx

This test is actually failing:

fireEvent.click(getAllByText('+1')[0]);

But the test didn't catch the error.

@dai-shi
Copy link
Owner

dai-shi commented Dec 3, 2020

Yes, that was the whole point of having used changedBits=0.
Since v1.3, it won't work. v2-alpha won't work either. It's something we can't solve in userland as far as I understand currently.
The spec is kept in the repo (as well as 03_stale_props) to show the limitation. Those two specs are skipped.

@csr632
Copy link
Contributor Author

csr632 commented Dec 3, 2020

Oh I guess I didn't fully understand this line in README :)

Tearing is only avoided within the Provider tree. A value outside the Provider will tear. (02_tearing_spec fails)

Feel free to close this.

@dai-shi
Copy link
Owner

dai-shi commented Dec 3, 2020

@csr632 Would you have any suggestion to improve the line in README? I'm not confident it's well written.

@csr632
Copy link
Contributor Author

csr632 commented Dec 4, 2020

How about #32

@dai-shi
Copy link
Owner

dai-shi commented Dec 4, 2020

Yeah, that explains more carefully. Thanks for the suggestion. Closing this.

@dai-shi dai-shi closed this as completed Dec 4, 2020
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

2 participants