Skip to content

Commit 0cbca93

Browse files
DoctorJohnmikehardy
authored andcommitted
docs(auth): fix function name shadowing
1 parent 08cee09 commit 0cbca93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/auth/usage/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ function App() {
5858
const [user, setUser] = useState();
5959

6060
// Handle user state changes
61-
function onAuthStateChanged(user) {
61+
function handleAuthStateChanged(user) {
6262
setUser(user);
6363
if (initializing) setInitializing(false);
6464
}
6565

6666
useEffect(() => {
67-
const subscriber = onAuthStateChanged(getAuth(), onAuthStateChanged);
67+
const subscriber = onAuthStateChanged(getAuth(), handleAuthStateChanged);
6868
return subscriber; // unsubscribe on unmount
6969
}, []);
7070

0 commit comments

Comments
 (0)