Browse Source

A typo (#5644)

It should be `useContext(AuthContext)` whereas it's `useContext(AuthProvider)`.
main
Ruokai Zhao 2 years ago
committed by GitHub
parent
commit
38fbdafdcb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      beta/src/content/reference/react/useContext.md

2
beta/src/content/reference/react/useContext.md

@ -1337,7 +1337,7 @@ function MyApp() {
} }
``` ```
As a result of this change, even if `MyApp` needs to re-render, the components calling `useContext(AuthProvider)` won't need to re-render unless `currentUser` has changed. Read more about [`useMemo`](/reference/react/useMemo#skipping-re-rendering-of-components) and [`useCallback`.](/reference/react/useCallback#skipping-re-rendering-of-components) As a result of this change, even if `MyApp` needs to re-render, the components calling `useContext(AuthContext)` won't need to re-render unless `currentUser` has changed. Read more about [`useMemo`](/reference/react/useMemo#skipping-re-rendering-of-components) and [`useCallback`.](/reference/react/useCallback#skipping-re-rendering-of-components)
--- ---

Loading…
Cancel
Save