Staq.js
withStaq
withStaq
The withStaq
function takes a rendered component tree and surrounds
it with contexts that provide methods and data used by the Staq.js
library. Specifically, the child component tree supplied as the
argument is wrapped in a
Provider for
Firebase, Stripe, and Auth contexts.
Import
import { withStaq } from '@staqjs/client'
Example Usage
The withStaq
function should usually be called inside index.js
,
when the application is mounted on the DOM.
ReactDOM.render( withStaq( <ThemeProvider theme={Theme}> <App /> </ThemeProvider> ), document.getElementById('root'))