Search documentation of phoenix_kit

# PhoenixKitWeb.Live.Modules.Entities.Hooks (phoenix_kit v1.6.19)

View Source

LiveView hooks for entity module pages.

Provides common setup and subscriptions for all entity-related LiveViews.

# Summary

## Functions

on_mount(atom, params, session, socket)

Subscribes to entity events and tracks user presence when the LiveView is connected.

# Functions

# on_mount(atom, params, session, socket)

Subscribes to entity events and tracks user presence when the LiveView is connected.

Add this to your entity LiveView with:

    on_mount PhoenixKitWeb.Live.Modules.Entities.Hooks

This automatically:

- Subscribes to entity creation, update, and deletion events
- Tracks authenticated user presence for dashboard statistics