JSFiddle - React, Tailwind, and code Playground
HTML
<input type='checkbox' id='LineOp' />
JavaScript
var getStstus = localStorage.getItem('LineOp');
if (getStstus === "true")
$("#LineOp").prop("checked", true);
$("#LineOp").click(function(){
localStorage.setItem('LineOp', $(this).prop("checked"));
});