SIGN IN SIGN UP
apache / superset UNCLAIMED

Apache Superset is a Data Visualization and Data Exploration Platform

0 0 151 TypeScript

address review: replace side-effect useMemo with idiomatic hooks

The former shouldComponentUpdate was re-implemented as a useMemo whose return
value was ignored, which is a misuse of useMemo (it was being used purely for
ref mutation side effects). Since the component is already wrapped in memo(),
the shallow prop compare handles re-render gating; the custom matrixify /
shouldRender logic was dead code.

Replace with:
- useMemo to clone queriesResponse (legitimate memoization)
- A prev-ref + useEffect pattern to track queriesResponse changes for render
  callbacks (safe to read refs during render when the value doesn't influence
  render output)

Drop the now-unused PrevPropsRef interface and the dead matrixify comparator.
E
Evan Rusackas committed
3cb187cf35cc7ee59793eba5c2b567a56de4e1a1
Parent: 9b8f2c5
Committed by Claude <claude@anthropic.com> on 5/12/2026, 5:12:35 PM