Skip to content

Conversation

@mogelbrod
Copy link
Contributor

@mogelbrod mogelbrod commented Aug 13, 2020

Fixes #46

  • Avoid state updates caused by useScroll() that doesn't cause the virtualized range to change
  • Remove the unnecessary reversedMeasurements array and scrollOffsetPlusOuterSize variable
  • Remove the no longer used useScroll hook

@mogelbrod mogelbrod changed the title perf: Don't update on scroll/rect changes unless virtualized range changes perf: don't update on scroll/rect changes unless virtualized range changes Aug 13, 2020
@tannerlinsley
Copy link
Collaborator

Looks good! Can you rebase with the last 2 PRs that came in?

@mogelbrod
Copy link
Contributor Author

Looks good! Can you rebase with the last 2 PRs that came in?

Done!

I also removed the useScroll hook that I couldn't get to work in favour of some (hopefully) more streamlined code.

Copy link

@uonr uonr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list doesn't corrently rendering when the parent containter wasn't mounted in the beginning.

Co-authored-by: coppa <dev@ioover.net>
@mogelbrod
Copy link
Contributor Author

@tannerlinsley This PR should be ready for another pass now 👍

@tannerlinsley
Copy link
Collaborator

Looks good!

@tannerlinsley tannerlinsley merged commit 9e5e06c into TanStack:master Aug 18, 2020
@tannerlinsley
Copy link
Collaborator

🎉 This PR is included in version 2.2.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gausie
Copy link

gausie commented Oct 6, 2020

@mogelbrod @tannerlinsley I think this change caused #68 and #56 because it attempts to interact with the parentRef element without checking whether it has been assigned (e.g. https://github.com/tannerlinsley/react-virtual/blob/master/src/index.js#L83)

@nx-cloud
Copy link

nx-cloud bot commented Jun 1, 2025

View your CI Pipeline Execution ↗ for commit 0cb45f0.

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded <1s View ↗
nx run-many --target=build --exclude=examples/** ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-06-01 10:33:40 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unnecessarily re-rendering when unchanged?

4 participants