[BP1] Fix Zustand selectors causing unnecessary re-renders #34
Labels
No labels
bug
feature-request
quickfix
test-coverage
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/parametric-furniture-cad#34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
BOMPanel and CutListPanel subscribe to entire store.
Impact: O(parts) recalculation on EVERY state change. INP regression as assembly grows.
Fix: Use useShallow selector or pass assembly directly to memoized selector:
const bom = useStore(useShallow((s) => selectBOM(s)));