We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2534424 commit 793829eCopy full SHA for 793829e
src/content/reference/react/useContext.md
@@ -577,7 +577,7 @@ const CurrentUserContext = createContext(null);
577
export default function MyApp() {
578
const [theme, setTheme] = useState('light');
579
return (
580
- <MyProviders theme={theme} setTheme={setTheme}>
+ <MyProviders theme={theme}>
581
<WelcomePanel />
582
<label>
583
<input
@@ -593,7 +593,7 @@ export default function MyApp() {
593
);
594
}
595
596
-function MyProviders({ children, theme, setTheme }) {
+function MyProviders({ children, theme }) {
597
const [currentUser, setCurrentUser] = useState(null);
598
599
<ThemeContext value={theme}>
0 commit comments