Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Latest commit

 

History

History
37 lines (28 loc) · 1.46 KB

File metadata and controls

37 lines (28 loc) · 1.46 KB

@shopify/react-csrf-universal-provider

Caution

@shopify/react-csrf-universal-provider is deprecated.

Shopifolk, see Shopify/quilt-internal for information on the latest packages available for use internally.

Build Status Build Status License: MIT npm version npm bundle size (minified + gzip)

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>
  );
}