Live View Section inside Non-Live View Section

Does Live View Section work under Non-Live View Section?

1 Like

There are a few ways to render a LiveView resource in your app. To include your LiveView within a template, just render it like:

 <h1>This is a normal Phoenix template</h1>
 <%= Phoenix.LiveView.live_render(@conn, AppWeb.ExampleLive, session: %{user_id: @user.id}) %>

You can view additional documentation here: https://github.com/phoenixframework/phoenix_live_view/blob/master/lib/phoenix_live_view.ex#L230

1 Like

I would even argue that most of the time this is the best option. Get all the nice stuff from regular phoenix Conns and make smaller more specific liveview components. Makes it much easier to manage them than one huge liveview.

3 Likes

How do you look into those github documentation? From where I can get idea for such lookup?