Embedding live view in eex :not_mounted_at_router

I am trying to embed a live view based form in a normal web page so I can get the nice validation etc. I am hitting the warning on :not_mounted_at_router, I see comments on github threads that I should declare LiveView in the router, but I am not quite sure what this actually means. I have the live view paths in the root scope but clearly this isn’t it.

What triggers the warning in your case?

There are a few limitations for liveviews not mounted at the router level: no access to params in mount, you can’t do live navigation unless you pass the :router option but, even so, still limited to one liveview with router per page .etc

Thanks, I didn’t know that. I have table of 4 x 4 and I wanted each one to be a live view which a user could click and edit the data of. I suppose to achieve this I should create 1 live view which renders the entire collection?

That would work, yes. You could also extract the whole editing part into a separate component.

If I may suggest, as an example, you could generate a new phoenix project passing in the --live flag, then generate a simple context and it will be setup exactly like this (check video of this blog post on the Phoenix’s website…first 3 minutes)