score:1

the problem is not from usestate, you call

axios.post(
  "http://localhost:9000/events/" + props.match.params.id,
  seteventcomment
)

the error you get is that the url

"http://localhost:9000/events/" + props.match.params.id

does not exist. i don't know how you are supposed to send the id might be

"http://localhost:9000/events?id=" + props.match.params.id

or something else but that's the issue according to your log :

from browser console. xhr.js:178 post http://localhost:9000/events/5f35e9c686c3a9132b5067b9 404 (not found) error: request failed with status code 404


Related Query

More Query from same tag