Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5cece7833
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!active || tooltipPayload.length === 0) { | ||
| return null | ||
| } | ||
|
|
||
| const tooltipLabel = React.useMemo(() => { |
There was a problem hiding this comment.
Call hooks unconditionally in ChartTooltipContent
ChartTooltipContent returns on !active before React.useMemo is called, so the number/order of hooks changes with tooltip state. When the tooltip active state flips during hover interactions, this can trigger React hook-order runtime errors (for example, rendered more/fewer hooks than expected) and break chart rendering. Move the memoized computation above the early return (or remove the hook) so hooks are invoked in a stable order on every render.
Useful? React with 👍 / 👎.
No description provided.