livebook-dev / kino

Client-driven interactive widgets for Livebook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LiveView interop

lambdaofgod opened this issue · comments

This is more of a question than an issue. Related to #46.

Is there a way to use something like HEEx in Livebook?

Context

I'm an Elixir noob and I'm trying to wrap my head around livebook. I really like LiveView HEEx templates, but from what I see they're tightly integrated with Phoenix.
It would be advantageous to have something like Kino.HEEX so that when I want to migrate Livebook to a Phoenix app I don't have to write everything from scratch.
I know that in Phoenix the templates use some of its machinery, but in principle it seems possible in livebook to wrap stuff inside ~H sigil in a context that would use actual Elixir variables instead of getting them from a socket.

Is some kind of intermediate level between kinos and LiveView HEEx templates possible? Did you have a usecase when you migrated Livebook to an actual LiveView app? How did you do it?

It is best to consider Livebook and LiveView as two distinct applications. Although Livebook is implemented with LiveView, there is no portability between them, they are distinct and we don't plan to integrate them further at the moment.

Also, for questions, please use the ElixirForum or the Discussions tab in Livebook. :)

And welcome to the Elixir community!