Type alias Provider<T>

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

See

React Docs

Example

import { createContext } from 'react';

const ThemeContext = createContext('light');

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

Type Parameters

  • T

Generated using TypeDoc