-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
Several components use useCallback with empty or incomplete dependency arrays, causing stale closures where the callback captures outdated state/props.
Affected files
src/components/LayersOutline/index.tsx:55, 86—moveLayerItemandrenderLayerItemcallbacks have empty[]dependency arrays but use values that can changesrc/components/SourcesOutline/index.tsx:28-57— same patternsrc/components/LeftSidebar/LayersTab.tsx:29—onClickcallback with empty dependency array
What needs to change
Add the correct dependencies to each useCallback array. Consider enabling the react-hooks/exhaustive-deps ESLint rule (see related issue) to catch these automatically.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working