4 ms·
There are a few different ways. One really easy way is to put a custom element at the root of the dom and just add/remove event listeners, maybe one-shot if th
by claytongulick 1y ago
There are a few different ways.
One really easy way is to put a custom element at the root of the dom and just add/remove event listeners, maybe one-shot if that's all you need.
I also have a convenient little library called ApplicationState [1], which basically does the same thing but can persist state in indexdb.
Lots of other libraries out there too.
[1] https://claytongulick.github.io/applicationstate/ https://claytongulick.github.io/applicationstate/