3 ms·
It's like that piece in Fantasia where the apprentice (Mickey) gains the wizard's powers, then loses control as all hell breaks loose. It's a powerful new tool,
by arcanemachiner 3y ago
It's like that piece in Fantasia where the apprentice (Mickey) gains the wizard's powers, then loses control as all hell breaks loose. It's a powerful new tool, but there's a time and a place for it, and I believe that the tendency towards LiveView-everywhere should be balanced against pure practicality. I look forward to a future in which the boundaries of the paradigm are more well-understood, and the models of when and how to use these tools are more fleshed-out.
Also, I agree with your heuristics. It is untenable to make a round trip to the server for things that can be done purely on the client side. Alpine.js is great for managing purely client-side stuff IMO (as are LV hooks, although I haven't used them too often), but they don't really mix well, and Alpine seems to have fallen out of favor lately with the Phoenix crowd as the complexity of people's projects starts to reveal the cracks in the paradigm.
To add to your heuristics, the `phx-loading` attribute should be used when possible to notify the user that 1) yes, you made the action, and 2) we're still waiting for a response.