View Source KinoLiveView (kino_live_view v0.1.0)
Documentation for KinoLiveView
.
Summary
Functions
Get the routes defined by KinoLiveView.SmartCell from within Livebook.
Functions
Get the routes defined by KinoLiveView.SmartCell from within Livebook.
Examples
You can use `KinoLiveView.get_routes/0` to dynamically inject routes in your Phoenix router.ex file.
```elixir
# router.ex
if Application.compile_env(:kino_live_view, :enabled) do
scope "/" do
pipe_through :browser
KinoLiveView.get_routes()
|> Enum.map(fn %{path: path, module: module, action: action} ->
live(path, module, action)
end)
end
end
```