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

stores handleWindowResize with useRef #231

Merged
merged 2 commits into from
Oct 5, 2019

Conversation

silltho
Copy link
Contributor

@silltho silltho commented Oct 5, 2019

Changes

  • stores handler as Ref to prevent recreation.

GitHub

@kettanaito
Copy link
Owner

Hello, @silltho! Thank you for this pull request.
It looks great. Could you please rebase your branch against the latest master and resolve a conflict around useViewportChange hook?

I've replaced debounce with throttle, so please do so in your feature branch, preserving useRef around. Feel free to refer to the master as the source of truth:

const handleWindowResize = throttle(callback, throttleInterval)

Thank you! You're awesome.

@silltho silltho force-pushed the 229-debounced-handlers branch from fdd3f6a to 62dbf53 Compare October 5, 2019 08:45
@silltho
Copy link
Contributor Author

silltho commented Oct 5, 2019

@kettanaito you have a great project and I'm glad to help you and get a pull request for the hacktoberfest. if you have anything else pls let me know.

Greetings from austria

@kettanaito
Copy link
Owner

Thank you for the kind words, @silltho! It's been a great experience working with you.

I've checkout your feature branch and confirm the CI passing. Welcome to contributors!

@kettanaito kettanaito merged commit 54d57b8 into kettanaito:master Oct 5, 2019
@kettanaito
Copy link
Owner

kettanaito commented Oct 5, 2019

If you wish to help with other issues, there are a few that could use some help:

Regardless, much thanks for the help!

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.

Debounced handlers re-created on each render
2 participants