@mercury-fx/phoenix_live_view
v3.0.0
Published
The Phoenix LiveView Client with Mercury Islands (UI+Effector)
Downloads
409
Readme
Phoenix LiveView Client
@mercury-fx/phoenix_live_view is the Phoenix LiveView JavaScript client, ported to
TypeScript for Mercury Islands. It ships standard ES2024 modules with TypeScript
declarations and needs no bundler:
npm i @mercury-fx/phoenix @mercury-fx/phoenix_live_viewimport { Socket } from "@mercury-fx/phoenix";
import { LiveSocket } from "@mercury-fx/phoenix_live_view";
const liveSocket = new LiveSocket("/live", Socket, { params: { _csrf_token: token } });
liveSocket.connect();@mercury-fx/phoenix_live_view/phoenix_html is the phoenix_html shim described
below. MIT, derived from Phoenix LiveView, Copyright (c) 2018 Chris McCord; see
LICENSE.
Upstream client notes
This is the documentation for the LiveView JavaScript client. It is a more low-level API documentation for advanced users. For a higher-level overview, see the page on JavaScript interoperability instead.
Important note
./src/phoenix_html.ts is the replacement for phoenix_html single file import in assets.
That's why phoenix_html does not required as dependency of the client bundle.
