bito-code-review[bot] commented on code in PR #42157:
URL: https://github.com/apache/superset/pull/42157#discussion_r3619722731


##########
superset-frontend/src/components/Chart/ChartRenderer.tsx:
##########
@@ -385,6 +395,10 @@ function ChartRendererComponent({
       setDataMask: setDataMaskCallback,
       onLegendScroll: handleLegendScroll,
       onChartStateChange,
+      // Lets self-contained chart components in superset-ui-core (e.g.
+      // StatefulChart) resolve async (202) chart-data responses without
+      // depending on app-level async-event middleware.
+      handleAsyncChartData: handleChartDataResponse,

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing useMemo dependency</b></div>
   <div id="fix">
   
   The `handleChartDataResponse` function is referenced inside the `hooks` 
useMemo but is missing from its dependency array. This violates React's Rules 
of Hooks and can cause stale closures if the function reference changes. Add 
`handleChartDataResponse` to the dependency array to ensure the hook recomputes 
when the function changes.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #865d13</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



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