Motivation
When using react-sizes in conjunction with a server-side mode, we are experiencing a flicker of the screen on either mobile or desktop (depending on the server-side configuration for sizes)
Concept
The concept is fairly simple: We are having a Context's Provider for the current size of the window, which is automatically updated through the window.addEventListener('scroll') event listener.
The initial value should be the window width, when the provider is initialized.
Open Questions
Motivation
When using
react-sizesin conjunction with a server-side mode, we are experiencing a flicker of the screen on either mobile or desktop (depending on the server-side configuration for sizes)Concept
The concept is fairly simple: We are having a Context's
Providerfor the current size of the window, which is automatically updated through thewindow.addEventListener('scroll')event listener.The initial value should be the
windowwidth, when the provider is initialized.Open Questions