Skip to content

Conversation

@iXanadu13
Copy link

What

Wrap disposables.forEach(disposable => disposable.dispose()) in the useEffect cleanup function instead of executing it immediately.

Why

The disposal logic was executed directly in the effect body, which caused all previously registered listeners to be disposed right after registration, making them ineffective.

Demo

https://codesandbox.io/p/sandbox/nostalgic-tdd-ypjjdv

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 96a884e:

Sandbox Source
dockview-app Configuration
editor-gridview Configuration
externaldnd-dockview Configuration
fullwidthtab-dockview Configuration
iframe-dockview Configuration
keyboard-dockview Configuration
nativeapp-dockview Configuration
rendering-dockview Configuration

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