Getting Started
Props
Pass values from a template into a component
- dead view
- props
Key concepts
Any assign passed to react/1
becomes a prop, including plain Elixir maps — they cross to JavaScript as
JSON, so %{name: "mrdotb", age: 30}
arrives in React as {name, age}.
This example needs no LiveView. Open it standalone → to see it served with no socket.
How it works
The template hard-codes a map and hands it straight to the component. There is no state, no event and no socket — this example is only about values arriving as props from wherever the template is rendered.