News for hackers. Stuff that matters.
Re:React to LiveView for Performance by peoplefromibiza on Wednesday June 21, 2023 @04:26AM (#36415907)
the same way you do it with every other technology

you write components for it

https://petal.build/

Re:React to LiveView for Performance by jamil7 on Wednesday June 21, 2023 @04:40AM (#36415993)
OK, so by mixing it with a JS library (Aline.js) by the looks of the source code.
Re:React to LiveView for Performance by peoplefromibiza on Wednesday June 21, 2023 @04:52AM (#36416072)
Frontend 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

[2] example of reacting to Monaco editor events: https://github.com/BeaconCMS/live_monaco_editor#fetching-the...