Closed SirbyAlive closed 8 months ago
Someone is attempting to deploy a commit to a Personal Account owned by @pablo-abc on Vercel.
@pablo-abc first needs to authorize it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
felte-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 24, 2024 4:50pm |
Proposition to fix #195 .
According to Solid documentation https://www.solidjs.com/docs/latest/api#ref:
In practice, this means that when the function passed to
ref
is called, elements are created but not attached, resulting on theHTMLFormElement
being passed toformAction
empty with no children.The documentation indicates the moments the functions are evaluated:
From that and some tests it appear that:
ref
is a pointer, it is accessible inonMount
orcreateEffect
are called after it is attached to the DOM.ref
is a function, it is called before the DOM is attached.ref
is a function,onMount
andcreateEffect
are first called before it is attached to the DOM.As shown by this trace:
Which led to my current proposition to proxy the
ref
into a signal observed in an effect. So Felte is initialized onceDOM is ready to be parsed. It does feel hacky though...