From 968bd54ef82f5369d965a5bc1a4dc3c7b1826508 Mon Sep 17 00:00:00 2001 From: Mykolas Mankevicius Date: Thu, 14 Dec 2023 00:20:16 +0200 Subject: [PATCH] Update docs to show the edge case for push_event (#2950) --- lib/phoenix_live_view.ex | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/phoenix_live_view.ex b/lib/phoenix_live_view.ex index 5fcc1e44eb..37e392ade5 100644 --- a/lib/phoenix_live_view.ex +++ b/lib/phoenix_live_view.ex @@ -658,9 +658,12 @@ defmodule Phoenix.LiveView do 2. They can be handled inside a hook via `handleEvent`. - Note that events are dispatched to all active hooks on the client who are - handling the given `event`. If you need to scope events, then this must - be done by namespacing them. + Events are dispatched to all active hooks on the client who are + handling the given `event`. If you need to scope events, then + this must be done by namespacing them. + + Events pushed during `push_redirect` are currently discarded, + as the LiveView is immediately dismounted. ## Hook example