1
When I need to capture data in Reactjs via querystring, I use the command this.props.match.params.[NOME_DA_QUERY]
.
Does anyone know how to capture when this data comes by POST?
1
When I need to capture data in Reactjs via querystring, I use the command this.props.match.params.[NOME_DA_QUERY]
.
Does anyone know how to capture when this data comes by POST?
Browser other questions tagged javascript post react react-router
You are not signed in. Login or sign up in order to post.
Dude, I don’t recommend using the body of a request via client-side, but if this data is coming from a form, there is this lib that helps you: https://github.com/insin/react-router-form
– Francisco
I don’t understand your question. How are you sending data via Post to React?
– Caio Felipe Pereira
@Francisco, thank you so much for the tip, I didn’t know this library. The solution I ended up taking was: in the imput keyup of the first form, I was saving the data to a localStorage. Back at React, I can take this data quietly.
– Gabriel Arantes