Using React FeaturesHooks

useOkto

Learn more about the useOkto() hook here!

Overview

Learn more about the useOkto hook here and it's usage here.

Example usage

Fetching list of supported networks for your API Key using the Okto SDK using the useOkto hook.

Sample.ts
        import { useOkto, type OktoContextType, type User} from 'okto-sdk-react';
 
        const { getSupportedNetworks } = useOkto() as OktoContextType;
 
        getSupportedNetworks()
            .then((result) => {
                console.log(result)
            })
            .catch((error) => {
                console.error(`error:`, error);
            });

On this page