react-gauge-chart
A React gauge chart package with 270k+ monthly downloads on npm. The owner made me a maintainer on npm and GitHub after 9 merged pull requests.
Why it was hard
A widely used package had re-render loops, server-side rendering crashes and needle animation bugs. Any fix had to keep working for thousands of existing apps.
How it works
- 01
Fix
Removed re-render loops, server-side rendering crashes and needle animation bugs.
- 02
Extend
Added opt-in props for needle clamping and arc labels, so existing users see no change.
- 03
Verify
Checked every change against the previous release's SVG output in React 17 and 18.
What I learned
In a popular package, the safest change is one existing users never notice. Opt-in props and output comparisons make that possible.
Related
Need something like react-gauge-chart?
Tell me what you want to build. I reply with questions, then a written scope before any work starts.