4 ms·
Thats not what modern frameworks are evolving to, though. Svelte doesn't have a "touch everything" approach like React. Interactions are compiled at build time
by tiagod 4y ago
Thats not what modern frameworks are evolving to, though. Svelte doesn't have a "touch everything" approach like React. Interactions are compiled at build time and only the JS needed to change the specific things that aren't static is generated. There is no runtime.
With jQuery on the other hand you're bundling a whole bunch of stuff you probably don't need to do things modern vanilla JS is perfectly capable onlf. And you'll have to reinvent the wheel every time either way.
Sure, your simple approach is probably enough for small stores selling a few items, but it really doesn't scale to all of them. And it makes for a way better development experience to use a modern framework for all but the very simplest of interactions.