React implementation of numeraljs
To install, you can use npm or yarn:
$ npm install --save react-numeral
$ yarn add react-numeral
Here is a simple example of react-numeral being used in an app :
import React from 'react';
import Numeral from 'react-numeral';
class App extends React.Component {
render() {
return (
<Numeral
value={100000}
format={"0,0"}
/>
);
}
}
value
- The number you want to formatformat
- The format (see here for the complete list )