News for hackers. Stuff that matters.
Re:Ask HN: What happened to vanilla HTML/CSS/JS development? by jraph on Friday September 09, 2022 @01:05PM (#32781937)
Very interesting indeed. That's some food for thought.

Though I should note that if this code has a "store.js" file, this is not the kind of store that I had in mind. More like the Svelte store [1], or Redux (which I find awfully complex).

I didn't know the "storage" event on Window [2] (which, for the record, triggers when localStorage is modified from another page. Does not trigger when modified from the same page, which makes localStorage not sufficient as-is to build the kind of store I'm referring to).

[1] https://svelte.dev/tutorial/writable-stores

[2] https://developer.mozilla.org/en-US/docs/Web/API/Window/stor...

Re:Ask HN: What happened to vanilla HTML/CSS/JS development? by CraigJPerry on Friday September 09, 2022 @04:22PM (#32784415)
>> Does not trigger when modified from the same page

I'm thinking that's the purpose of https://github.com/1Marc/todomvc-vanillajs-2022/blob/main/js... - without dispatching that custom save event, there wouldn't be a way to react at any other locations on the same page to the store updating.