Docs
/Hooks
/useCurrencyConverter()
useCurrencyConverter()
More detailed explanation and examples coming soon!
Check out the Storybook (via the link in the navbar) so see live examples of @xrpl-components/react
in action.
import { useCurrencyConverter } from '@xrpl-components/react/hooks';
export function YourComponent() {
const { rates, error, isLoading } = useCurrencyConverter({
fromCurrency: 'XRP',
toCurrency: 'USD',
});
return <div>{/* ... */}</div>;
}