<AuthContextProvider /> is a React Component that provides the context for
the useAuth() hook to be used by components further down your component
tree. It should only be included in your component tree once and ideally at
the root of the application.
Example
import * as React from 'react'
import { AuthContextProvider, useAuth } from '@oneblink/apps-react'
function Component() {
const auth = useAuth()
// use auth here
}
function App() {
return (
)
}
const root = document.getElementById('root')
if (root) {
ReactDOM.render(, root)
}
<AuthContextProvider />
is a React Component that provides the context for theuseAuth()
hook to be used by components further down your component tree. It should only be included in your component tree once and ideally at the root of the application.Example