react-native-animate-number
react-native-animate-number copied to clipboard
Always format displayValue with given formatter
In some cases when initial value was set to 0 it was not formatted. This lead to inconsistency in UI eg. first number was shown as '0' then as '5%' etc. to '100%' and then back to '0%'. It should always be presented as '0%'.
This change ensures that state.displayValue is always formatted with props.formatter. Provided that this property was set, if not it defaults back to 0.