zlacker

[return to "Please disable JavaScript to view this site"]
1. enw+Yv[view] [source] 2020-11-29 01:51:09
>>abused+(OP)
I’d love to get rid of JS for my personal sites, but I know of no clean and simple way to render dynamic content otherwise. Server-side rendering seems a bit messy. I want a clean REST API separate from the UI.

How can I generate pages with dynamic content easily? Ideally with absolute minimal dependencies.

◧◩
2. dreamc+dx[view] [source] 2020-11-29 02:04:12
>>enw+Yv
A REST API is purely a server-side issue, so you don't need JS for that (unless your server is Node of course).

You still need Ajax (at least) for truly dynamic content. The bad news is that Ajax requires client-side JS. The good news is minimal Ajax functionality only takes about 30 lines of pure Javascript. The bad news is you will need to write those 30 lines yourself because every JS library is at least 100x bigger than that and packed with cruft you don't need.

My advice is to pretend React doesn't exist, learn Javascript, and write just the Javascript you need and no more.

[go to top]