importing react hooks code example
Example 1: how to use hooks react
const App = () => {
const [students , setStudents] = useState([]);
return (
// put in the jsx code here
)
}
Example 2: usestate
const [count, setCount] = useState(0);
const App = () => {
const [students , setStudents] = useState([]);
return (
// put in the jsx code here
)
}
const [count, setCount] = useState(0);