> Rather than eagerly loading the react-scroll dependency for this, they load it on interaction with the button, saving ~7KB:
My apologies for being negative but isn't it crazy it takes 7KB to scroll to the top of the page?
My apologies for being negative but isn't it crazy it takes 7KB to scroll to the top of the page?
Smooth scrolling in 42B (minified, not gzipped) rather than 7KB, and supported by 85% of users' browsers (source for that number: https://caniuse.com/mdn-api_scrolltooptions)