React Component that provides the context for the useDrafts() 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 { DraftsContextProvider, useDrafts } from '@oneblink/apps-react'
function Component() {
const draftsContext = useDrafts()
// use drafts here
}
function App() {
return (
)
}
const root = document.getElementById('root')
if (root) {
ReactDOM.render(, root)
}
React Component that provides the context for the
useDrafts()
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