Recently I've stumbled upon this code
defmodule MyAppWeb.PageLive do
use MyAppWeb, :live_view
It's part of default app generated with Phoenix Live View (mix phx.new --live).
It's first time when I see the use construct with a function name as a second argument.
I've tried to search the web on some docs about it but couldn't find a proper naming for this.
Can you help me understand what happens when this executes?
It doesn't call __using__ macro but calls a function instead, and I'm not sure whether I can pass some options there, or I need to use the "normal" way (with __using__ macro).
I've tried something like use MyAppWeb, :live_view, opts but that raises undefined function use/3