dan
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
beta/src/pages/apis/usecontext.md
|
|
@ -1329,7 +1329,7 @@ Call `useContext` at the top level of your component to read and subscribe to [c |
|
|
|
import { useContext } from 'react'; |
|
|
|
|
|
|
|
function MyComponent() { |
|
|
|
const theme = useTheme(ThemeContext); |
|
|
|
const theme = useContext(ThemeContext); |
|
|
|
// ... |
|
|
|
``` |
|
|
|
|
|
|
|