Answers for "reference hook in react"

0

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>
Posted by: Guest on June-28-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language