usaState using api react 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);