​​React​Network Information API,Playwright,TypeScript,useSyncExternalStore,カスタムフック

Thumbnail of post image 188

スマホのモバイル回線が遅いときやデータセーバーがオンのときだけ、小さい画像に切り替えます。React で navigator.connection を useSyncExternalStore で読むフックを作り、回線を遅くして確かめ ...