()
| 350 | * one slice. |
| 351 | */ |
| 352 | export function useChart(): ChartContextValue { |
| 353 | const stable = useChartStable(); |
| 354 | const hover = useChartHover(); |
| 355 | // Identity changes on every hover (hover is the volatile slice) — that's |
| 356 | // fine for consumers using this merged hook; they explicitly opted in to |
| 357 | // re-rendering on hover. |
| 358 | return { ...stable, ...hover }; |
| 359 | } |
| 360 | |
| 361 | export default ChartStableContext; |
no test coverage detected