To Add:
style components
React
useState - declares a 'state variable' whose value can be preserved between function calls.
const [count, setCount] = useState()
useEffect - call a function (side effect) after the component has rendered
useEffect(() => {
fetch("http://localhost:4000/leaders")
.then((r) => r.json())
.then(setUserResults);
},[])
React Router DOM Library
useNavigate - navigate the broswer programmatically
Supplementing {Router, Routes, Route}
useParams - returns an object of key/value pairs of the dynamic params from the current URL that were matched by the .
Router, Routes, Route
Top comments (0)