mikebridge commented on issue #39209:
URL: https://github.com/apache/superset/issues/39209#issuecomment-4409973030

   This looks great!  Replacing a monolithic do-all piece of architecture with 
smaller pieces that are each right for the job will really help with 
maintainability long-term.
   
   One thing---we may want to be more explicit about using selectors---the 
"After" example is:
        
    ```typescript
   const { editMode, setEditMode } = useDashboardStore();
   ```
   
   This destructure causes the component to re-render on every dashboard-store 
change, not just editMode.  The pattern for scaling zustand is to use 
selectors: 
   
   ```typescript
   const editMode = useDashboardStore(s => s.editMode);
   const setEditMode = useDashboardStore(s => s.setEditMode);
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to