The generated iex result below should list products instead of product for the metadata. (page 67)
iex> product = %Product{}
%Pento.Catalog.Product{
__meta__: #Ecto.Schema.Metadata<:built, "product">,
…
}
The mount/3 function that is generated is different from the one used in the example, this might be confusing if you are familiar with the way pipes are used in Elixir. (Page 87)
def mount(_params, _session, socket) do
{:ok,
socket
|> assign(:greeting, "Welcome to Pento!") # add this line
|> assign(:products, list_products())}
end
Instead of
{:ok, assign(socket, :products, list_products())}
These few lines of code are a bit different from what we’ve seen before,… (Page 98)
Actually we have already seen this exact code 2 pages earlier, starting on page 96.
Suggestion: introduce the repeated code with: “Here’s the line of code that calls the modal component from the index template again:”
That means the component must implement a handle_event/3 function for the “close” event, which is does here: (Page 103)
Should be “… which it does here:”
Notice there’s an :id key, as well as a :component key that specifies the FormComponent (Page 106)
It is unclear what the :component_key is.