Convert drawingState, selectedLineId, dragState, and annotations to refs that stay in sync with state via useEffect. The chart click handler (subscribeClick) captured stale closure values for these variables. Now reads from refs (e.g. drawingStateRef.current) so the handler always sees the latest state, and removed the stale state variables from the useEffect dependency array. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| changes | ||
| specs | ||
| config.yaml | ||