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

A different, faster approach? #179

Open
johntdowney opened this issue Aug 14, 2019 · 0 comments
Open

A different, faster approach? #179

johntdowney opened this issue Aug 14, 2019 · 0 comments

Comments

@johntdowney
Copy link

johntdowney commented Aug 14, 2019

Hey all, I was using this library for a while until I realized yesterday I could use the ResizeSensor class from the css-element-queries library to achieve the same results. I can't tell if it's faster or not though, but it seems like unless something like this is already being done under the hood of this library then it has to be faster.

I'm not quite sure how ResizeSensor does the magic it does, but it provides a hook into a very fast and reliable individual element resize event. Here's a jsfiddle illustrating what I mean. The way I have done it there makes some assumptions as it depends on the user setting up their varying-height columns to contain a single element and for that single element's height to be accurately represented by the clientHeight variable (i.e. no borders).

However, despite dealing with those assumptions, I think it might be faster than this library. Am I wrong? Are you all already doing something like this?

Also, sorry if this is the wrong place to post a question like this. Please let me know where I should post it though!

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

1 participant