# give/4.18.0/src/DonationForms/resources/app/hooks/useCurrencyFormatter.ts

GiveWP – Donation Plugin and Fundraising Platform, version 4.18.0. 10 lines.

- Page: https://pluginprobe.com/plugins/give/4.18.0/code/src/DonationForms/resources/app/hooks/useCurrencyFormatter.ts
- Raw: https://pluginprobe.com/plugins/give/4.18.0/raw/src/DonationForms/resources/app/hooks/useCurrencyFormatter.ts
- Modified: 2023-10-16T17:55:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.18.0/code/src/DonationForms/resources/app/hooks/useCurrencyFormatter.ts#L10-L20`.

```typescript
import {useMemo} from 'react';
import amountFormatter from '@givewp/forms/app/utilities/amountFormatter';

/**
 * @since 3.0.0
 */
export default function useCurrencyFormatter(currency: Intl.NumberFormatOptions['currency'], options?: Intl.NumberFormatOptions) {
    return useMemo(() => amountFormatter(currency, options), [currency, navigator.language]);
}

```
