I was reading about Phoenix verified routes in the docs, and there is this code:
<.link href={~p"/sessions/new"} method="post">Sign in</.link>
I tried searching around, but I couldn’t find any information about that “leading dot”.
I was reading about Phoenix verified routes in the docs, and there is this code:
<.link href={~p"/sessions/new"} method="post">Sign in</.link>
I tried searching around, but I couldn’t find any information about that “leading dot”.
That’s shorthand for either a locally defined function component or more commonly an imported function component module with use Phoenix.Component
.