score:1

const { auth} = useAuthContext();

  React.useEffect(() => {
    console.log("auth updated to: "+auth);
  }, [auth]);

score:3

const auth = React.useContext(AuthContext);

Related Query

More Query from same tag