From a55fefbfea0a8d5039788c09f7e9b8f9d8fc0faf Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Mon, 12 Feb 2024 13:21:15 +0100 Subject: [PATCH] Fix links to phx-hook docs (#3113) Some links were correctly pointing to `#client-hooks-via-phx-hook`, some not. --- guides/client/bindings.md | 2 +- lib/phoenix_live_view.ex | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/guides/client/bindings.md b/guides/client/bindings.md index e1be730dad..b4fd6f6b79 100644 --- a/guides/client/bindings.md +++ b/guides/client/bindings.md @@ -22,7 +22,7 @@ callback, for example: | [Key Events](#key-events) | `phx-keydown`, `phx-keyup`, `phx-window-keydown`, `phx-window-keyup`, `phx-key` | | [Scroll Events](#scroll-events-and-infinite-stream-pagination) | `phx-viewport-top`, `phx-viewport-bottom` | | [DOM Patching](dom-patching.md) | `phx-mounted`, `phx-update`, `phx-remove` | -| [JS Interop](js-interop.md#client-hooks) | `phx-hook` | +| [JS Interop](js-interop.md#client-hooks-via-phx-hook) | `phx-hook` | | [Lifecycle Events](#lifecycle-events) | `phx-mounted`, `phx-disconnected`, `phx-connected` | | [Rate Limiting](#rate-limiting-events-with-debounce-and-throttle) | `phx-debounce`, `phx-throttle` | | [Static tracking](`Phoenix.LiveView.static_changed?/1`) | `phx-track-static` | diff --git a/lib/phoenix_live_view.ex b/lib/phoenix_live_view.ex index b039334507..af464d6b7d 100644 --- a/lib/phoenix_live_view.ex +++ b/lib/phoenix_live_view.ex @@ -1398,7 +1398,7 @@ defmodule Phoenix.LiveView do > Note: This function is for server-side lifecycle callbacks. > For client-side hooks, see the - > [JS Interop guide](js-interop.html#client-hooks). + > [JS Interop guide](js-interop.html#client-hooks-via-phx-hook). Hooks provide a mechanism to tap into key stages of the LiveView lifecycle in order to bind/update assigns, intercept events, @@ -1504,7 +1504,7 @@ defmodule Phoenix.LiveView do > Note: This function is for server-side lifecycle callbacks. > For client-side hooks, see the - > [JS Interop guide](js-interop.html#client-hooks). + > [JS Interop guide](js-interop.html#client-hooks-via-phx-hook). If no hook is found, this function is a no-op.