set value of input using useRef react code example
Example: how to add value with useref in react
useEffect(() => {
if (titleRef.current) titleRef.current.value = item?.title;
if (desRef.current) desRef.current.value = item?.description;
});
useEffect(() => {
if (titleRef.current) titleRef.current.value = item?.title;
if (desRef.current) desRef.current.value = item?.description;
});