I was thinking: since it's just a checkbox...you could store it in a cookie rather than local storage. This way you could even SSR the value and fix the hydration problem (and you could potentially also progressive enhance that setting the cookie with JS It available and on the server if not)