3 ms·
The LiveView is just a HTML page so you can have whatever CSS/JavaScript you like on the client side for animations and interactivity. Talking to the server is
by mcintyre1994 6y ago
The LiveView is just a HTML page so you can have whatever CSS/JavaScript you like on the client side for animations and interactivity. Talking to the server is opt-in and you’d basically do it wherever you’d usually make an API call from React etc. The go-to for JS in LiveView seems to be Alpine (https://github.com/alpinejs/alpine https://github.com/alpinejs/alpine) but I haven’t got around to trying that out myself yet.
- rkangel 6y agoI'm not sure it's really 'opt in' - talking to the server is the default way of changing what's on your screen. Adding a whole front end framework is going to conflict with what's going on with the LiveView elements. Alpine is the default because it's good for "sprinkling" little elements of interactivity into an otherwise statically rendered page.