Skip to content

Commit

Permalink
use PageView.render in counter.ex step 14 v0.9.0 #5
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Mar 10, 2020
1 parent f2df2dd commit f6a5be5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -1261,8 +1261,8 @@ The line `{:noreply, assign(socket, msg.payload)}`
just means "don't send this message to the socket again"
(_which would cause a recursive loop of updates_).

> 馃弫 At the end of Step 13 the `counter.ex` file should match:
[`lib/live_view_counter_web/live/counter.ex#L4`](https://github.com/dwyl/phoenix-liveview-counter-tutorial/blob/33e0e47fd379e1314dcba6509d214c9468632c77/lib/live_view_counter_web/live/counter.ex#L4)
> 馃弫 The changes made in Step 13 are:
[`lib/live_view_counter_web/live/counter.ex`](https://github.com/dwyl/phoenix-liveview-counter-tutorial/pull/6/commits/f2df2ddad97f8621365dcf455a218b1b59362a59)

<br />

Expand Down
8 changes: 1 addition & 7 deletions lib/live_view_counter_web/live/counter.ex
Expand Up @@ -26,12 +26,6 @@ defmodule LiveViewCounterWeb.Counter do
end

def render(assigns) do
~L"""
<div>
<h1>The count is: <%= @val %></h1>
<button phx-click="dec">-</button>
<button phx-click="inc">+</button>
</div>
"""
LiveViewCounterWeb.PageView.render("counter.html", assigns)
end
end

0 comments on commit f6a5be5

Please sign in to comment.