Liveview without a form_component?

I want to use for forms only, but when I create a live component with mix phx.gen.live it creates:

  • index.ex
  • form_component.ex

how do I merge these two into one (without using components)?

Copy/paste the code you want from the component into the liveview and delete form_component.ex?

The generators just create example code. It’s good to get an idea of how things are structured when you’re learning but after that you can ignore them and create whatever file structure you like.

1 Like