Skip to content

Major Release (v5) - React Number Format rewrite

Compare
Choose a tag to compare
@s-yadav s-yadav released this 25 Sep 15:32
· 74 commits to master since this release

RNF v5 is complete rewrite with the aim of extensibility and smaller bundle size. Here are following changes on v5. Most of them are breaking change, but would take minimal effort from migrating from v4 to v5. See migration doc

Changes

  • React number format is broken into smaller Modules, NumericFormat and Pattern Format, so only things you need are exposed.
  • RNF provides lower level hooks and component (useNumericFormat, usePatternFormat) to allow full customisation. Check customisation doc.
  • customNumerals prop is removed in favour of outside customization, example
  • isNumericString prop is renamed to valueIsNumericString.