Get data by POST on Reactjs

Asked

Viewed 131 times

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?

  • 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

  • 1

    I don’t understand your question. How are you sending data via Post to React?

  • @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.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.