end defp put_tweets ( socket, tweet ) do tweets = assign ( socket, :tweets, tweets ) end In just four easy commands you’ll have your own Phoenix Live View project up and running with an example clock on the homepage.ĭefmodule ElixirConfLiveViewWeb. So, as a convenience I have created a phx_live_view template so that everyone can have a fresh Phoenix Live View project quick and easy. You can read more about that here and be sure to watch the video made by Dave about this. I am always looking for ways to make sure we as a community don’t have to do all kinds of manual tasks over and over again and I recently came accross a cool library created by Dave Thomas that provides a really nice and clean way to create template projects. Setting up a project for LiveView is explained step-by-step in the LiveView Repository, so we could of course just create a Phoenix Project and follow those steps and set everything up like that. Very awesome stuff! I’d like to take the concept of LiveView to a slightly different direction and use it to create one of the use cases Chris has mentioned, a LiveView dashboard! With the upcoming ElixirConfEU in Prague, let’s see if we can actually get something meaningful off the ground. Most things I have seen thusfar have been standalone interactive little projects that contain either some nifty animations and/or some interactivity using forms. Now that we have a common understanding of what LiveView is, let’s see what we can explore today using LiveView. If you are totally new to LiveView and haven’t heard about it, be sure to check out the initial blog post on the Dockyard website and also this talk by Chris. People have been experimenting wildly with the immense power that comes with Phoenix Live View. There is some real excitement going on in the Elixir community after the fact that Chris McCord made his PhoenixLiveView repo available to the public.
0 Comments
Leave a Reply. |