We're exploring a little-known hook from React 18, useSyncExternalStore, which was originally billed as a tool for external library creators, but turns out to be quite suitable for synchronizing with the browser API.
Timestamps:
00:00 Topic Introduction
00:34 Documentation Introduction
03:44 MatchMedia Example
06:34 ResizeObserver Example
09:09 IntersectionObserver Example
12:49 LocalStorage Sync Example
16:27 Summary
My web courses with coupons:
✅ https://mishanep.com/
My Telegram channel:
✅ https://t.me/mishanep_channel
📢 Channel Support:
/ mishanep
https://www.tinkoff.ru/rm/nepomnyasch...
https://paypal.me/mishanep