use Moneyhook
The hook takes a MoneyV2 object and returns a
default-formatted string of the amount with the correct currency indicator, along with some of the parts provided by
Intl.NumberFormat.
must be a descendent of a
component.
Anchor to useMoney-parametersParameters
Anchor to useMoney-returnsReturns
UseMoneyValue
The localized amount, without any currency symbols or non-number types from the parts.
The currency code from the object.
A string returned by for the amount and currency code, using the
locale
value in the component.
The object provided as an argument to the hook.
All parts returned by .
A string with trailing zeros removed from the fractional part, if any exist. If there are no trailing zeros, then the fractional part remains. For example, $640.00
turns into $640
. $640.42
remains $640.42
.
A string without currency and without trailing zeros removed from the fractional part, if any exist. If there are no trailing zeros, then the fractional part remains. For example, $640.00
turns into 640
. $640.42
turns into 640.42
.
The name for the currency code, returned by .
The currency narrow symbol returned by .
The currency symbol returned by .