Wraps your components to specify the value of this context for all components inside.

Type Parameters

  • T

See

React Docs

Example

import { createContext } from 'react';

const ThemeContext = createContext('light');

function App() {
return (
<ThemeContext.Provider value="dark">
<Toolbar />
</ThemeContext.Provider>
);
}

Generated using TypeDoc