React - decimal plugin, accounting with formatMoney function

0 votes
49 views
added Apr 21, 2021 in React by lcjr First Warrant Officer (9,190 points)
import accounting from 'accounting';

return (
  <>
  <h5 className="listing-price">
    From {accounting.formatMoney(price, 'RM ', 0)}
  </>

)

// output RM 200,000

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...