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

   The other thing about zustand is: how much do the **extensions** rely on the 
redux _store_?  I would think that the surface area for zustand+extensions is 
quite small, unless there are lots of global client state changes.
   
   I think that the real benefit to extensions would be the simplicity of 
calling tanstack hooks to call the server, e.g.:
   
     - "Give me the current dashboard"    
    ```typescript
   const { data: dashboard, isLoading } = useCurrentDashboard(); 
    ```
    - "Give me this chart's results"
   ```typescript
   const { data, isLoading, error } = useChartResults(chartId, {
        formDataOverrides: { time_range: 'Last 7 days' },                       
                                                                                
                                          
   });
   ```         
   - "Give me the user's datasets"
   ```typescript
     const { data, isLoading } = useDatasets({
       filters: { ownedByCurrentUser: true },                                   
                                                                                
                                         
       pageSize: 25,
     });
   ```
   - "Give me the running queries" (with `refetchInterval` to poll)
   ```typescript
     const { data: running } = useRunningQueries();    
     return <Badge count={running?.length ?? 0}>Running queries</Badge>; 
   ```


-- 
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