JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://github.com/carhartl/jquery-cookie/blob/master/jquery.cookie.js"></script>
Inheritance Line:
<label><input name='inheritanceline' type='radio' value="father" checked ></input>Father</label>
<label>
<input name='inheritanceline' type='radio' value="mother"></input>Mother</label>
JavaScript
$("input:radio[name=inheritanceline]").change(function () {
if ($(this).attr("checked") == "checked") {
$.cookie('inheritanceline', $(this).val());
}
window.location.reload();
});