Skip to content

Replace react-sizes with custom implementation #31

@iduuck

Description

@iduuck

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions