The following code from page 94 needs to be updated:
def mount(_params, _session, socket) do
{:ok, assign(socket, :products, list_products())}
end
# ...
defp list_products do
Catalog.list_products()
end
The generators now produce the following:
def mount(_params, _session, socket) do
{:ok, stream(socket, :products, Catalog.list_products())}
end