@shopify/react-csrf-universal-provider
v3.1.4
Published
A self-serializing/deserializing CSRF token provider that works for isomorphic applications
Downloads
751
Maintainers
Keywords
Readme
@shopify/react-csrf-universal-provider
A self-serializing/deserializing CSRF token provider that works for isomorphic applications.
Installation
yarn add @shopify/react-csrf-universal-provider
Usage
// App.tsx
import {CsrfUniversalProvider} from '@shopify/react-csrf-universal-provider';
function App({token}: {token?: string}) {
return (
<CsrfUniversalProvider value={token}>
{/* rest of the app */}
</CsrfUniversalProvider>
);
}