▲ useScreenSize - React hook for responsive rendering at github.com▼1 up and 0 down, posted by nicmosc 1922 days ago 2 comments
jaleksic 1921 days ago. link 1 point ▲ ▼Also, feel free to use @loopmode/events for this. It will use only a single DOM event listener no patter how many components use your hook! (Shameless self-advertising here, I wrote it, but it's a perfect use case)
jaleksic 1921 days ago. link 1 point ▲ ▼Improvement: You should check for and use passive Events when available when adding/removing resize listener. https://www.npmjs.com/package/detect-passive-events