JSFiddle - React, Tailwind, and code Playground
HTML
<input name="testing" type="hidden">
JavaScript
var test = $("input[name=testing]:hidden");
test.val('work!');
alert('The value of hidden input is: ' + test.val())
<input name="testing" type="hidden">
var test = $("input[name=testing]:hidden");
test.val('work!');
alert('The value of hidden input is: ' + test.val())