Firebase – Argument of type 'User | null' is not assignable to parameter of type 'SetStateAction<User | null>'
Trying to implement user authorization through Firebase in a new React project. import { User } from '@firebase/auth-types'; // ... const [user, setUser] = useState<User | null>(null); const auth = getAuth(); onAuthStateChanged(auth, (newUser) => { setUser(newUser); }); Error on setUser(newUser);…