I’m not sure if I’m just misunderstanding or if perhaps I’m missing something but it appears the example found here Phoenix.LiveView — Phoenix LiveView v0.20.2 presumes an already existing Thermostat module and a user id system? Is it not meant to be followed along? The prefacing language makes it sound like it can be followed along if desired:
Before writing your first example, make sure that Phoenix LiveView is properly installed. If you are just getting started, this can be easily done by running mix phx.new my_app --live . The phx.new command with the --live flag will create a new project with LiveView installed and configured. Otherwise, please follow the steps in the installation guide before continuing.
Please tell me if I’m just confused or if perhaps I missed something but it’s a little frustrating trying to follow along with the official documentation to be met with something like this lol. Thanks in advance.
I think that is a side effect of the docs being semi-extracted/written in tandem from a few tutorials at some point. I remember there being one that was explicitly about controlling a thermostat. I think view that section of the docs as more broadly explaining the “general idea” at first. Read through it, accept that it might not all make 100% sense then come back to it after playing around.
I know that doesn’t feel great to read as a new user.
These might help:
This seems to provide a good first-run tutorial, skim reading it: Getting Started with Phoenix LiveView, It’s from 2020, so some things have changed in LV 0.17 but they shouldn’t effect you running through it. *see note
My advice might be to run through the pragmatic studio tutorial to “get a feel for it” in a guided way, then re-read that opening in the docs to solidify your understanding of how those bits fit together, then post back with anything that doesn’t make sense.