Skip to content

Conversation

@ibgreen
Copy link
Collaborator

@ibgreen ibgreen commented Nov 18, 2025

For https://openjs-foundation.slack.com/archives/C05JCDKHQUE/p1763426667707549

Summary

  • ensure useWidget removes widgets regardless of index so the first widget cleans up correctly
  • add a React StrictMode regression test verifying widgets are not duplicated after remount

Testing

  • yarn test node --filter react/deckgl.spec.ts

Codex Task


Note

Fixes useWidget cleanup to remove widgets at index 0 and adds a React StrictMode test to prevent duplicate widgets after remount.

  • Bug Fix
    • In modules/react/src/utils/use-widget.ts, correct cleanup condition to remove the widget even when its index is 0, then update deck props.
  • Tests
    • Extend test/modules/react/deckgl.spec.ts with a React StrictMode test component using useWidget to verify only one widget remains after StrictMode remount.

Written by Cursor Bugbot for commit 5883356. This will update automatically on new commits. Configure here.

@ibgreen ibgreen changed the title Fix useWidget cleanup and add StrictMode test fix(widgets): useWidget cleanup and add StrictMode test Nov 18, 2025
@ibgreen ibgreen requested a review from chrisgervang November 18, 2025 11:05
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.

4 participants