Hello Everyone,
I am coming from old version of phoenix which 1.4.2-1.5 something. Thought to move to the latest version of phoenix 1.7.7. After scaffolding new phoenix project , the project structure drastically improved. Though I have went through Change logs and understand heex and live components, How can start to start to move to this new project structure?
In the new scaffold
The View in AppWeb.ex is completely missing view
def view do
quote do
use Phoenix.View, root: "lib/rumbl_web/templates", namespace: RumblWeb
unquote(html_helpers())
unquote(verified_routes())
end
end
there is no view or templates. I find it difficult to grasp the new layout.
If some one can explain it will be really helpful.
That’s kinda expected. Generally it’s not expected for people to update existing projects to new conventions given things are still fully backwards compatible.
I first read that as if they walked all the way up to 1.7.7 but now I wonder if they just jumped from 1.5 to 1.7 via the diff in which case that would be too much all at once.
Yes I went through change log from 1.5.1 , 1.5.2 … … ,and after reading that I moved directly to 1.7.7. It was lot of changes. there I found , there was no backward compatibility, you need to rename templates to .heex, otherwise throws errors/render fx dont work. and dynamic html attribute value to wrapped around {“#{}”}. And conversion to functional component.And correcting <%= %> dynamic expression to {} for html attribute.added phoenix view,