DEV Community

Discussion on: JavaScript Should Be Your Last Resort

Collapse
pozda profile image
Ivan Pozderac

I see what you did there!

Working with SPAs, PWAs and hybrid apps I cannot escape using JS/TS, but you have valid point there. For a static site there are several approaches but the one I like the most is the idea and concept behind 11ty as its output is as 'pure' as it can be.

Never do things with JS if you can do it with CSS - that's both sane decision as well as using technologies the way they are intended to be used.

Also, I would add -> use HTML tags as they should be used, div is okay, but too many apps and pages are suffering from div-itis.

Collapse
olpeh profile image
Olavi Haapala Author

Yeah, totally agree, but can't fit everything in one post. I could write another post about the importance of semantic HTML.

Meanwhile you can read this amazing post by my colleague Eevis: dev.to/eevajonnapanula/ode-to-sema...

Collapse
ojrask profile image
Otto Rask

PWA can be a regular HTML + CSS + req/res looped website with just the service worker thing installing the PWA, no need to go "all in" with JS/TS there either.

Collapse
pozda profile image
Ivan Pozderac

I totally agree that you should strip everything you don't need and that mostly depends from project to project. PWAs I was working on were mostly data driven apps and were interactive. Can't have real time graph without at least some JS on client considering there was no SSR mechanism included.