Quantcast
Channel: User antpaw - Stack Overflow
Viewing all articles
Browse latest Browse all 35

Answer by antpaw for How to redirect user with POST data in ReactJS?

$
0
0

Create a form element and submit it. This is how jquery-ujs does it. Obviously you need to rewrite this basic code to react, but you get the idea.

  var href = body.success.message.redirect_url,    form = $('<form method="post" action="'+ href +'"></form>'),  form.hide().appendTo('body');  form.submit();

Viewing all articles
Browse latest Browse all 35

Trending Articles