You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "mikebridge (via GitHub)" <gi...@apache.org> on 2026/05/08 21:25:29 UTC

Re: [I] [SIP-207] Replace Redux with Zustand and TanStack Query [superset]

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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org