https://reactjs.org/docs/hooks-intro.html code example
Example 1: reference hook in react
import React, {useRef} from 'react'
const displayNode = useRef(null)
//action
displayNode.current.textContent = `${count} Appointments Successfully Uploaded`
//referenced object
<div ref={displayNode} className="text-center mt-3 msg" style={{ color: "green", fontWeight: "800" }}></div>
Example 2: how to use hooks react
const App = () => {
const [students , setStudents] = useState([]);
return (
// put in the jsx code here
)
}