3 ms·
Assuming that the counter state is on the client. A button with an event listener that runs x.innerHTML = state.counter++ makes a lot more sense than a round tr
by kaleidawave 6y ago
Assuming that the counter state is on the client. A button with an event listener that runs x.innerHTML = state.counter++ makes a lot more sense than a round trip to the server.
Just looked and Turbo is 135kb. I rewrote this website (http://40.115.126.159/ http://40.115.126.159/) with my own JS framework and it comes at 15kb, that's 9x smaller Turbo...
- Lio 6y agoIn that case you could avoid making the round trip completely by just adding some native JS. There's nothing in Stimulus or Hotwire that prevents that. I think they actually mention adding Stimulus controllers in the demo video for those usecases.