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

Fixes #88 #92

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Fixes #88 #92

wants to merge 2 commits into from

Conversation

mrclay
Copy link

@mrclay mrclay commented Jul 21, 2022

  • rewrite with useSyncExternalStore.

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update
[x] Bug fix
[ ] New feature
[ ] Other, please explain:

What changes did you make? (Give an overview)

Require React 18, use useSyncExternalStore for more reliable subscription.

Which issue (if any) does this pull request address?

#88

Is there anything you'd like reviewers to focus on?

@mrclay
Copy link
Author

mrclay commented Jul 24, 2022

@aralroca While I think (barely) understand teaful's design, I'm lost in applying the new hook. Any guidance?

Copy link
Collaborator

@aralroca aralroca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think it's perfect to implement it with useSyncExternalStore, it's something I was looking to do some time ago but I got stuck half way. Any idea how it should be implemented?

@mrclay
Copy link
Author

mrclay commented Aug 8, 2022

@aralroca Take a look at https://gist.github.com/mrclay/6ad71d1993e5d97e11aff1285c67eaf6 for a crude partial implementation.

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

Successfully merging this pull request may close these issues.

2 participants