GameServerWeb.OnMount.Theme (game_server_web v1.0.938)

Copy Markdown

on_mount helper for LiveView that ensures :theme is assigned on the socket. LiveViews can rely on @theme being present whether rendering via an HTTP request or a websocket socket lifecycle.

The theme map is cached in persistent_term after the first computation so subsequent LiveView mounts are essentially free.

Summary

Functions

on_mount(atom, params, session, socket)