Skip to content

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