Closed Dylan-aidkr closed 6 months ago
You need a static
node at the root of a live component, like a div
~F"""
<div>
<Form class={["form-table-row"]}>
<div> hello </div>
</Form>
</div>
"""
Unrelated, but Form
is being deprecated, so might want to write new code without it, and just use the phoenix form/1
component.
I misunderstood the meaning of static
node until now.
for some styling requirements, I couldn't simply wrap it with a div. I will try phoenix form/1
instead.
Thank you for the answer.
Describe the bug
if i use Form component in Surface Live Component, it raises 'Stateful components must have a single static HTML tag at the root' error
How to reproduce it
Your Environment
Surface: v0.11.4 LiveView: v0.20.14 Elixir: v1.15.5 (compiled with Erlang/OTP 26)