JSFiddle - React, Tailwind, and code Playground

HTML

<div id="clickforrefresh">Refresh</div>

JavaScript

localStorage.setItem("update", "0");

$('body').on('click', '#clickforrefresh', function(){
    localStorage.setItem("update", "1");
});