Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace react-sizes with custom implementation #31

Open
3 tasks
iduuck opened this issue Sep 10, 2020 · 0 comments
Open
3 tasks

Replace react-sizes with custom implementation #31

iduuck opened this issue Sep 10, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@iduuck
Copy link
Member

iduuck commented Sep 10, 2020

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

  • Will we support Mobx-State-Tree?
  • What will happen on server-side rendering?
  • Do we need to have a document listener?
@iduuck iduuck added the enhancement New feature or request label Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant