You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
State is currently a loose collection of useStates in the main app viewer, and it's gotten large enough that passing props around is becoming a chore (see CanvasWrapper). This would be a great opportunity to switch a state management framework (e.g. Zustand, Redux).
Move all useState declarations in Viewer.tsx into their own hook or store.
Move shared state modifiers (like setFrameAndRender, findTrack, handleDatasetChange, replaceDataset) into hook or store.
Remove prop drilling for CanvasWrapper.tsx, Export.tsx, CanvasHoverTooltip, ColorRampDropdown, and any other components with more than 8 props in Viewer.tsx.
Details
This will likely need to be split up into multiple PRs.
The text was updated successfully, but these errors were encountered:
Use Case
State is currently a loose collection of
useState
s in the main app viewer, and it's gotten large enough that passing props around is becoming a chore (seeCanvasWrapper
). This would be a great opportunity to switch a state management framework (e.g. Zustand, Redux).Acceptance Criteria
useState
declarations inViewer.tsx
into their own hook or store.setFrameAndRender
,findTrack
,handleDatasetChange
,replaceDataset
) into hook or store.CanvasWrapper.tsx
,Export.tsx
,CanvasHoverTooltip
,ColorRampDropdown
, and any other components with more than 8 props inViewer.tsx
.Details
The text was updated successfully, but these errors were encountered: