4 ms·
the same way you do it with every other technology you write components for it https://petal.build/ https://petal.build/
by peoplefromibiza 3y ago
the same way you do it with every other technology
you write components for it
https://petal.build/ https://petal.build/
- jamil7 3y agoOK, so by mixing it with a JS library (Alpine.js) by the looks of the source code.
- peoplefromibiza 3y agoFrontend components are frontend, so until JavaScript is the only viable option, the answer is yes. LiveView is a channel to pass data back and forth between backend and frontend in a very performant and size-effective way, that hides all the complexity involved, making it astonishingly simple to get started. The presentation layer it's up to the developers. Wanna react to a change? setup a `phx-*` event Wanna handle some custom event? Setup a hook [1] [2] [1] https://hexdocs.pm/phoenix_live_view/js-interop.html https://hexdocs.pm/phoenix_live_view/js-interop.html [2] example of reacting to Monaco editor events: https://github.com/BeaconCMS/live_monaco_editor#fetching-the-editor-value https://github.com/BeaconCMS/live_monaco_editor#fetching-the...