# phoenix-liveview > Critical Phoenix LiveView guidelines that prevent common bugs, memory issues, and deprecated patterns. Use when writing LiveView modules, LiveView tests, or working with streams, navigation, forms, or JS hooks. Prevents memory ballooning from improper collection handling, deprecated function usage, and common test failures. - Author: Forest Carlisle - Repository: forest/dotfiles - Version: 20260103142125 - Stars: 4 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/forest/dotfiles - Web: https://mule.run/skillshub/@@forest/dotfiles~phoenix-liveview:20260103142125 --- --- name: phoenix-liveview description: Critical Phoenix LiveView guidelines that prevent common bugs, memory issues, and deprecated patterns. Use when writing LiveView modules, LiveView tests, or working with streams, navigation, forms, or JS hooks. Prevents memory ballooning from improper collection handling, deprecated function usage, and common test failures. --- # Phoenix LiveView Guidelines ## Navigation - **Never** use deprecated `live_redirect` or `live_patch` - **Always** use: - Templates: `<.link navigate={href}>` and `<.link patch={href}>` - LiveViews: `push_navigate/2` and `push_patch/2` ## Module Naming & Routing - Name LiveViews with `Live` suffix: `AppWeb.WeatherLive` - Router's `:browser` scope is aliased with `AppWeb`, so use: `live "/weather", WeatherLive` ## LiveComponents **Avoid LiveComponents** unless you have a strong, specific need. Prefer function components. ## JavaScript Hooks - **Never** write embedded `