View Source React (Lightning v2.11.1)
A way to use React with Phoenix LiveView.
Summary
Functions
Generates a unique ID for a React component.
Returns a list of React components that are defined in the given app.
Associates a JSX file with a component.
File paths are relative to the assets/js/react
directory.
Such files will become entrypoints for ESBuild, but common code is code-split
by ESBuild into separate chunks.
Functions
Generates a unique ID for a React component.
Returns a list of React components that are defined in the given app.
Associates a JSX file with a component.
File paths are relative to the assets/js/react
directory.
Such files will become entrypoints for ESBuild, but common code is code-split
by ESBuild into separate chunks.
A custom Mix compiler will ensure these files are compiled.
Example
defmodule Button do
use React.Component
jsx "components/Button.tsx"
end