Thank you for the great article with a good example, really helped me understand the hook. However I think there is a small error in your code snippet: getSnapshot function should return data, but in your code here it does not.
Would love to know why does useEffect might cause "might cause over-returning Hooks and unwanted re-rendering of components" whereas useSyncExternalStore does not. I couldn't find this information in the doc links you listed
Your post gave me a lot of useful information. This is a topic that interests me as well, so I hope you will read the connections article.
Outside of React, third-party state management libraries hold state. doodle jump
Great article! 👏 The useSyncExternalStore Hook seems like a powerful tool for integrating non-React state management in our apps.
Praveen V
Blogger @learnfreeblog.com, Blogger @hashnode, Word press developer, Web Developer, Data Scientist
devtohash.hashnode.dev/javascript-vs-typescript-c…