import { Meta } from '@storybook/addon-docs'; # useSigv4Client A React hook returning an instance of Sigv4Client to be used to run fetch call with AWS signed API requests. ## Usage useSigv4Client should be used within **CognitoAuth** context. **identityPoolId** and **region** should be provided as props of CognitoAuth component. ```jsx import useSigv4Client from '@aws-northstar/ui/components/CognitoAuth/hooks/useSigv4Client'; ... // Get Sigv4Client fetch callback const client = useSigv4Client(); const [response, setResponse] = useState(); const [error, setError] = useState(); const handleFetch = useCallback(async () => { try { const response = await client(, ); setResponse(await response.json()); } catch (err) { setError(err); } }, [client, url]); ... ```