phoenix_live_view
phoenix_live_view copied to clipboard
Support declarative assigns in LiveComponent and LiveView
Do we want to go this route? Or should we tell them to wrap their LiveComponent/LiveView in a function component? I am not the biggest fan of the second because it hides the internal complexity.
Leftover from #2016.
I would like to start exploring declarative assigns for LiveComponents next, then move to declarative assigns for LiveViews based on what we learn.
I am also not a fan of wrapping LiveComponents and LiveViews in a HEEx function component. HEEx function components look like HTML and imply no hidden state or behavior. Visually I think it makes sense for LiveComponents and LiveViews to stand out and take a bit more syntax to setup.
Hopefully that will guide users towards writing smaller function components and composing those together?
Is this something that is blocking the 0.18 release or will it be released afterwards?
Afterwards.
FWIW, I'd also like to see at least LiveComponent support declarative assigns (I arrived here while trying to figure out if this is in the plan)
Closing this for now. The best option for now is to wrap them in a function component.