29
loading...
This website collects cookies to deliver better user experience
Person
. From here we pass name and age data to child component Student
by props. This prop is name
and age
. Props are mutable.const [count, setCount] = useState(0);
import React, {useState} from `react`;
const useAuth = () => {
const [user, setUser] = useState({});
return {user, setUser};
}
export default useAuth;