Apart from Go’s fat WASM size which is a severe con for now, I would hope WASM can replace Javascript entirely whenever possible. Why? → Mainly due to:
- type constraints
- code shedding (only packs codes that I need)
- Re-use my Go library as much as possible
- PWA compatibility (offline and online modes)
What I can see Javascript framework/library can’t get through code shedding (hence the complaint of fat and bloating library or framework, usually near its development maturity) without another of its derived library to do the compiling job.
Do I hate Javascript and its derivatives? No. However, if a CSR can re-use my SSR library codes with a single programming language, I will definitely use it.
I can see the next evolution is server-side only offers API while client-side performs user interface rendering and operations, especially given the current geo-political reasons and warfare =( ; and E2EE requirements (e.g. Bitwarden).
FYI: I will begin full WASM exploration starting next month intending to upgrade my hugo theme module into full CSR frontend library.