BB.LiveView.Hooks.AssignRobot (bb_liveview v0.2.4)

View Source

LiveView on_mount hook that assigns the robot module to the socket.

This hook is automatically applied by the bb_dashboard/2 router macro. It validates that the robot module exists and has a robot/0 function, then assigns it to the socket for use by dashboard components.

Summary

Functions

Mounts the robot module into the socket assigns.

Functions

on_mount(robot_module, params, session, socket)

Mounts the robot module into the socket assigns.

The robot module is passed as the second argument from the live_session configuration.