Skip to content

Add React hook wrapper for ChartGPU#3

Merged
hunterg325 merged 2 commits intomainfrom
add-react-wrapper
Jan 19, 2026
Merged

Add React hook wrapper for ChartGPU#3
hunterg325 merged 2 commits intomainfrom
add-react-wrapper

Conversation

@hunterg325
Copy link
Copy Markdown
Member

Add React hook wrapper for ChartGPU

  • Introduce a useChartGPU React hook that manages ChartGPU instance lifecycle, including async initialization, StrictMode safety, and cleanup on unmount.[page:2]
  • Add WebGPU support detection and structured error state, exposing { chart, isReady, error } for consumers to handle loading and unsupported environments.[page:2]
  • Implement debounced resize handling via ResizeObserver and update logic to call setOption when options change for responsive, reactive charts.[page:2]
  • Export useChartGPU and its UseChartGPUResult type from the package entrypoint to make the hook available to consumers.[page:2]

@hunterg325 hunterg325 merged commit 815d4b3 into main Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant