Version 5.0.0-0
Pre-release
Pre-release
- Migrate to new countup version (#509) 944d721
- Check props formattingFn (#508) deb2754
- Bump rollup from 2.52.3 to 2.52.4 (#505) f38a59d
- Bump @testing-library/react-hooks from 7.0.0 to 7.0.1 (#507) eb7cf50
BREAKING
New API for useCountUp
:
You need to define ref
- id of html element, input, svg text element, or DOM element reference where counting occurs
const Hook = () => {
const span = React.useRef(null);
useCountUp({ end: 10, ref: span });
return <span ref={span} />;
};
const Hook = () => {
useCountUp({ end: 10, ref: "counter" });
return <span id="counter" />;
};