LiveIsolatedComponent.ViewUtils (live_isolated_component v0.10.0)

View Source

Collection of utils for people that want to write their own mock LiveView to use with m:LiveIsolatedComponent.live_isolated_component/2.

Summary

Functions

Use this function to get the slot list if for some reason is not working for you.

This function renders the given component in component (be it a function or a module) with the given assigns and slots.

Functions

mount(params, session, socket, opts \\ [])

Run this in your mock view Phoenix.LiveView.mount/3.

Options

  • :on_mount, boolean, defaults to true. Can disable adding on_mount hooks.

prerender_slots(assigns)

Use this function to get the slot list if for some reason is not working for you.

render(assigns)

This function renders the given component in component (be it a function or a module) with the given assigns and slots.