Was passing atoms to the form component deprecated?

Hi! I’m upgrading some old LiveView projects and I’m getting the classic “protocol Phoenix.HTML.FormData not implemented” error on some pages. I remember being able to pass an atom to the .form component, was this deprecated?

If you don’t know what I’m talking about, this is an example: live_beats/lib/live_beats_web/live/profile_live/upload_form_component.html.heex at 712204ca172ed6d36456c8ed4fd6aaba50099447 · fly-apps/live_beats · GitHub. IIRC, we had this protocol implemented for atoms as well.

I’m having trouble finding exactly where it happened but if memory serves me correctly it was when the :as option was introduced. So it would be <.form :for={%{}} as={:songs}> now.

Ya, the LiveView docs still say :as is type any though in 0.18 stopping calling out that you could pass an atom (I don’t know why I got so curious about that other than I had completely forgotten about that and got a lil nostalgic).

Yeah, I guess it happened sometime after 0.18 (the current version of the LiveBeats app); but I can’t find it documented anywhere… I find it a little bit weird now that you have it as a required field but you pass an empty value to get the same behaviour. But I guess it makes sense with how things work with changesets (it’s also more explicit).