react-countup
react-countup copied to clipboard
Amount being Rounded
Hi There,
I am currently having an issue where the formatting function is returning a rounded up number.
I have a pricing point at 17.99, starting at 0. When putting 17.99 as the end property, it returns $18.00.
I can't seem to find where this is happening, or a property to disable this. The formattingFn didn't seem to help either, as the parameter returns the rounded up value.
My CountUp Render:
<CountUp
delay={1}
start={0}
end={17.99}
decimals={1}
duration={2}
useEasing={true}
/>
Thanks for the help!
Fixed this by chancing the decimals property to 2 instead of 1.