You can stop using `form_for`
The standard way to render a <form>
in Phoenix used to be the form_for/4
helper, but recent versions of Phoenix added a new function component called <.form>
, AKA Phoenix.Component.form/1
.
I wasn’t sure when to use form_for/4
instead of <.form>
, but it turns out that the answer is “never”. I wrote up my full findings here:
https://phoenixonrails.com/blog/you-can-stop-using-form-for-in-phoenix
Read next Unpacking Elixir: Syntax