JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<input name="foo[]" value="bar1"></input>
<input name="foo[]" value="bar2"></input>
<input name="foo[]" value="bar3"></input>
</form>
<div>
</div>
JavaScript
data = $('form').serialize();
$('div').append(data);