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

resize observer option #27

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

osdiab
Copy link

@osdiab osdiab commented Mar 4, 2020

Closes #26
Closes #24

  • I am unsure if the flow type is correct since I don’t use flow
  • I added resize-observer-polyfill as a dev dep since it's bundled with flow and typescript typings for ResizeObserver to use (it’s not available in the standard TypeScript libs since it’s still not a confirmed spec yet), though can just inline those if we don't want to include it as a dep

still ensuring this works locally, having some issues with getting it to lazy load as in the readme changes i made

EDIT: it does work, just need to wrap the set state call in a function; ResizeObserver is a function so setState() interprets it as a state reducer, which is not what we're trying to achieve. fixing the README

EDIT 2: done

@osdiab osdiab force-pushed the osdiab/resize-observer-arg branch from 8e85731 to 1d20575 Compare March 5, 2020 03:14
@osdiab osdiab force-pushed the osdiab/resize-observer-arg branch from 1d20575 to ab49a0a Compare March 5, 2020 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow passing in a ResizeObserver ponyfill Readme should indicate that ResizeObserver is optional
1 participant