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

Reduce renders during drag operations #767

Merged
merged 21 commits into from
Jan 9, 2025

Conversation

chrisvxd
Copy link
Member

@chrisvxd chrisvxd commented Jan 5, 2025

Introduces targeted use of zustand to address re-render issued or made more noticeable with the new drag-and-drop engine.

Remaining performance improvements require larger state overhaul (see #644).

Tasks

  • Switch core state to Zustand
  • Account for multiple instances of Puck on page, since Zustand uses global state (i.e. docs site)
  • New items flashing on drop - caused by useDeferredValue

Remaining performance improvements require larger state overhaul.
Copy link

vercel bot commented Jan 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
puck-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 9, 2025 4:51pm
puck-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 9, 2025 4:51pm

@chrisvxd chrisvxd added this to the 0.18 milestone Jan 6, 2025
chrisvxd added a commit that referenced this pull request Jan 6, 2025
This addresses an issue where the collision would jump after a zone change, noted as part of original #598 implementation and made more frequent in #767 after performance improvements.
This addresses an issue where the collision would jump after a zone change, noted as part of original #598 implementation and made more frequent in #767 after performance improvements.
@chrisvxd chrisvxd force-pushed the improve-dropzone-render-performance branch from 54146c7 to 810fc6f Compare January 7, 2025 16:18
@chrisvxd chrisvxd marked this pull request as ready for review January 9, 2025 18:06
@chrisvxd chrisvxd merged commit 9c64ea4 into main Jan 9, 2025
4 checks passed
chrisvxd added a commit that referenced this pull request Jan 9, 2025
This addresses an issue where the collision would jump after a zone change, noted as part of original #598 implementation and made more frequent in #767 after performance improvements.
@chrisvxd chrisvxd deleted the improve-dropzone-render-performance branch January 9, 2025 18:09
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