📄️ Client-side Javascript
LiveViewJS pages do, in fact, require some client-side javascript to be loaded as part of the HTML page. This client-side javascript handles parsing the phx-* attributes, connecting to the server (via websocket), appling the diffs, and turning user interactions into events, among other things.
📄️ "Hooks" (not the React kind)
Sometimes you need to do something that is not supported by any of the existing user event bindings or that requires hooking into a client-side DOM event. LiveView has "Hooks" for these types of situations.
📄️ Example Hook
Let's create a hook that will format a text input into a phone number as a user types.