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

react-measure as hook #132

Open
tho-graf opened this issue Feb 23, 2019 · 2 comments
Open

react-measure as hook #132

tho-graf opened this issue Feb 23, 2019 · 2 comments

Comments

@tho-graf
Copy link

tho-graf commented Feb 23, 2019

Hi y'all,

have you already thought about offering react-measure as a hook? I played a little bit with this idea and created a working proof of concept (see here: https://github.com/thomaskempel/use-resize-observer)

I copied some stuff from this repo and tried to offer similar interfaces. How do you like the idea?

Cheers,
Thomas

@souporserious
Copy link
Owner

Thank you for the proposal @thomaskempel! I recently did some explorations that are more of what I was trying to do in #97. It essentially splits out responsibilities for each phase of collecting measurements for flexibility. As of right now, I'm thinking of shipping a couple of different hook implementations that can be composed together in a useMeasure hook as seen in this codesandbox. My schedule has been a little hectic lately, but I'll put together a PR soon for feedback!

@zaprvalcer
Copy link

It would be great to have this feature, is it still relevant?..

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

No branches or pull requests

3 participants