Closed JavaKaran closed 2 years ago
After clickcing on edit button the note information is not auto populating with the information. I have checked with everything but it is working the same in every case
useEffect(() => { const fetching = async () => { const { data } = await axios.get(`/api/notes/${match.params.id}`); setTitle(data.title); setContent(data.content); setCategory(data.category); setDate(data.updatedAt); }; fetching(); }, [match.params.id, date]);
Make sure your inputs are controlled, not uncontrolled.
I am still having the same issue. The get request from the useEffect isn't loading the note from the database
After clickcing on edit button the note information is not auto populating with the information. I have checked with everything but it is working the same in every case