In this post I will be refactoring the settings
form to use LiveView.
This is a continuation from part one LiveView authentication using phx.gen.auth part 1
Part 1
I initial tried to convert the registration form to use liveview; however, I ran into issues handling user session so I have decided to refactor the settings form.
After wrangling with the code for a bit I came to realize that maybe for user registration form liveview might not be the best solution. But not all hope is lost there are potential solutions to this, see below:
- Chris McCord provides a way to pass info from
conn
tosocket
- Toran Billups walks through his solution for liveview authentication
Part 2
In this video we'll setup our live
route, liveview module and leex
form template
Part 3
We finally complete refactoring a subset of the setting form to use liveview.