Skip to main content

Global provider

Global provider

Theme developers can provide a GlobalProvider from the theme, wrapping it at the root of the React app. Create a React HOC as your wrapper, as shown in the example.

// Your React HOC in a separate file

function GlobalProvider({ children }) {
return (
<div className="provider">
{ children }
</div>
);
}

// Export it from index.jsx file

getGlobalProvider: () => GlobalProvider

Was this section helpful?