4 ms·
I haven't looked too closely at LiveView yet. I did flip back and forth between going with the Hotwire approach (I guess inspired by LiveView?). It was a tough
by matthewmueller 4y ago
I haven't looked too closely at LiveView yet. I did flip back and forth between going with the Hotwire approach (I guess inspired by LiveView?).
It was a tough call, but I ultimately decided to server-render JS. This thought-experiment helped:
• If Ruby could natively render Javascript, would they still choose the Hotwire approach? I concluded no. I don't see the reason to have multiple approaches (HTML over wire, Stimulus), when one solution would suffice. The one solution also happens to be way more familiar to today's frontend developers. I definitely didn't want to make another templating language.
Bud will eventually ship with it's own JS evaluator. Either through https://github.com/dop251/goja https://github.com/dop251/goja or through porting https://github.com/bellard/quickjs https://github.com/bellard/quickjs to Go (~25kloc of C)