How to use the @shopify/react-network.useRequestHeader function in @shopify/react-network

To help you get started, we’ve selected a few @shopify/react-network examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Shopify / quilt / packages / react-server / src / providers / providers.tsx View on Github external
return function CombinedProvider({children}: Props) {
    const csrfToken = useRequestHeader('x-csrf-token') || '';

    return (
      
        
          {children}
        
      
    );
  };
}

@shopify/react-network

A collection of components that allow you to set common HTTP headers from within your React application

MIT
Latest version published 3 months ago

Package Health Score

53 / 100
Full package analysis

Similar packages