Skip to content

Commit e9d2178

Browse files
committed
Fix ThemeContext usage in MyApp component
1 parent 6cae3ff commit e9d2178

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/reference/react/memo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,12 @@ export default function MyApp() {
226226
}
227227

228228
return (
229-
<ThemeContext.Provider value={theme}>
229+
<ThemeContext value={theme}>
230230
<button onClick={handleClick}>
231231
Switch theme
232232
</button>
233233
<Greeting name="Taylor" />
234-
</ThemeContext.Provider>
234+
</ThemeContext>
235235
);
236236
}
237237

0 commit comments

Comments
 (0)