TwistingTwists

TwistingTwists

Watching Phoenix LiveView Talk by Chris McCord

I am in middle of watching this. I have to stop every minute and think over what Chris just said.

The amount of info he sends over that youtube video in one minute is more than a page of a book :stuck_out_tongue:

Am i the only one who feels that way?

P.S. : I am 15 minutes past in this video and it’s been more than an hour looking at newly generated phoenix folder and understanding what he is trying to explain.

Most Liked

MobileDev360

MobileDev360

JS.* is really nice feature! Because things like hide/show and over simple user interactions has required external javascript library like Alpine.js to work without server interactions, but now JS.* will do all of that

gdub01

gdub01

This talk and tech is so incredibly awesome. Enjoyed every minute. Slots, JS, and navigating over websockets… super great! ty!!

Sebb

Sebb

I’ve read that, but being lazy, I’d like a working demo-project.

Sebb

Sebb

Just had a look at this. The demo is there and running but relies on some local files, here are the steps to get it running.

  1. clone and checkout cm-js-cmds branch
  2. in /assets/js/app.js
- import {LiveSocket} from "./phoenix_live_view"
+ import {LiveSocket} from "phoenix_live_view"
  1. in mix.exs
- {:phoenix_live_view, path: "~/oss/phoenix_live_view", override: true},
+ {:phoenix_live_view, "~> 0.17.0"},
  1. update deps, setup ecto
  2. demo is at /posts (not on the overview page)

EDIT:

found one more thing to update:

--- a/lib/demo_web/live/post_live/show.html.heex
+++ b/lib/demo_web/live/post_live/show.html.heex
@@ -1,14 +1,16 @@
 <h1>Show Post</h1>
 
 <%= if @live_action in [:edit] do %>
-  <%= live_modal DemoWeb.PostLive.FormComponent,
-    id: @post.id,
-    title: @page_title,
-    action: @live_action,
-    post: @post,
-    return_to: Routes.post_show_path(@socket, :show, @post) %>
+  <.modal
+    component={DemoWeb.PostLive.FormComponent}
+    id={@post.id}
+    title={@page_title}
+    action={@live_action}
+    post={@post}
+    return_to={Routes.post_show_path(@socket, :show, @post)} />
 <% end %>
Sebb

Sebb

Great Talk, great new features!

Is the code for the LiveView.JS part (ElixirConf 2021 - Chris McCord - The Future of Full-stack - YouTube) available somewhere?

Or any other material about this?

I’m not sure what’s possible with the tools provided. E.g. can I do sth like this:

<button phx-click={JS.push("clicked", value: someCustomJavascriptFunction()}>

Where Next?

Popular in Talks Top

New
axelson
ElixirConf US 2018 Opening Keynote - The Next Five Years – José Valim (@josevalim) All talks thread:
New
axelson
ElixirConf 2017 - Working with legacy databases in Ecto - @geo Often when starting an Elixir or Phoenix proj...
New
ElixirConf
ElixirConf: ElixirConf 2023 - Tim Gremore - Replacing React: How Liveview solved our performance problems Comments welcome! View the <sp...
New
ElixirConf
ElixirConf: ElixirConf 2023 - Charlie Holtz - Building AI Apps with Elixir Comments welcome! View the <span class="hashtag-icon-placehol...
New
axelson
by @takasehideki Can you imagine that your Elixir code will be executed as a hardware circuit on an FPGA? The FPGA (Field-Programmable...
New
axelson
Let’s Talk Process Dictionary - @gregvaughn Well, the first rule of Fight Club, I mean: process dictionary is that we don’...
New
axelson
ElixirConf US 2018 – Docker and OTP: Friends or Foes? – Daniel Azuma (@dazuma) Docker is the hot deployment technology a...
New
axelson
I really like the idea of discussing one Elixirconf talk each day and since @brightball hasn’t posted the second talk I’ll post it. Elix...
New
axelson
ElixirConf 2017 - Closing Keynote - @chrismccord All talks are available in the Elixir Conf 2017 Talks List...
New

Other popular topics Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New

We're in Beta

About us Mission Statement