Hacker News new | ask | show | jobs
by dominic_cocch 3626 days ago
Very cool. We do something very similar on Instacart's site. Our main Redux store and header component track window size and scroll position so that all components on the site have that info and can react to if they need. Works wonderfully!
1 comments

Agreed, I didn't show it, but only have a single reducer handle those actions... I have state.window.{size,position} that keeps those values, that several components can then use for rendering.

I'm still curious as to when/if we may see the likes of aphrodite really take off.