3 ms·
It's not that trivial, yeah you stick it back into the DOM somehow eventually. But you might not be getting back full HTML, you might need to modify it by addin
by eloff 8y ago
It's not that trivial, yeah you stick it back into the DOM somehow eventually. But you might not be getting back full HTML, you might need to modify it by adding some css classes, or event listeners. You might only be getting back data which you generate the DOM from.
Basically you need a full programming language and DOM and events etc like we have now. But I fully agree that it's abused currently.
Full disclosure I contribute to the madness by developing ReactJS applications.
- mercer 8y agoI suspect Phoenix.LiveView will end up taking care of lots of the common use-cases with a relatively small client-side API, as much of the specifics would be handled on the server (including the code that gets triggered by an event). For the bits that really do need it, one would fall back on the 'regular' approach of writing client-side js. In my experience at least, a ton of the React work I do is quite similar within and across projects, and with many of the 'special bits' I'd be happy to resort to a more standard approach if it allows me to avoid React altogether (not that I hate React, I just love how much simpler everything would be if I can avoid it).