# `BB.LiveView.Hooks.AssignRobot`
[🔗](https://github.com/beam-bots/bb_liveview/blob/main/lib/bb/live_view/hooks/assign_robot.ex#L5)

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.

# `on_mount`

Mounts the robot module into the socket assigns.

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
