4 ms·
I don’t think you’re intimately familiar with the concept of maintaining state server side vs client side. The field is reactive, therefore under Hotwire/Livewi
by CodeWriter23 2y ago
I don’t think you’re intimately familiar with the concept of maintaining state server side vs client side. The field is reactive, therefore under Hotwire/Livewire/etx state changes (aka ‘typing on keyboard’) require a round trip to the server to get the state updated server side and to get the re-rendered component to update the client. Could he perhaps have chosen a different reactivity model, perhaps, or maybe not. In any event this is a clear illustration of client-side vs. server-side reactivity.
This is why we abandoned DHTML 2 decades ago, invested in jQuery to encapsulate variations in JavaScript across browsers and worked hard on standardizing JS so you could write code once and have it work across vendors.
- gjsman-1000 2y agoOr, as many approaches i.e. Livewire use, you can just use some JavaScript for basic interactivity, and send a non-trivial amount of state to the server in a batch rather than a request for each item. This is how I’ve implemented my website. I am quite aware of how this is done, I suggest you look further into it.