usage: ` import setupPersistentSignal from "https://esm.town/v/novari/persistentSignal"; import signals from "https://esm.sh/@preact/signals"; // or any other compatible library like @preact/signals-core, @preact/signals-react etc import { useLiveSignal } from "https://esm.sh/@preact/signals/utils"; // if you want to use your persistent signals as local signals
const persistentSignal = setupPersistentSignal(signals);
const userName = persistentSignal("username", "USERNAME-UNKNOWN"); //uses localStorage, so all values are turned into strings
function App(){ const user = useLiveSignal(userName); if (user == "USERNAME-UNKNOWN") return ( ); else return ( ); } `
(in theory, idk what's up with the random v3.module.town and esm.town/x/ and esm.town/v/ etc etc)