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

Cleaner implementation #10

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

gabeklein
Copy link

@gabeklein gabeklein commented Sep 26, 2020

Wanted to contribute a refactor I authored while reverse-engineering this module. I'm tinkering with react-virtual and found this to be it's only major dependency. Wanted to in-house logic on my end so iterating off this fork; at some point found a quick PR to be in order.

I've cleaned up the code to be more ES6'y and made it more readable. I've also pared down some unneeded steps and assertions. The algorithm should be a more efficient as a result, which is useful since it will run 60-120ips or more (especially on mobile).

To help with code-review:

  • Split discrete improvements made into separate commits
  • Changes are non-breaking and API exactly the same.
  • Tested using included serve script and works fine.

Feedback welcome!
Cheers

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.

1 participant