Phoenix Blog Posts

Using Select2 with Phoenix LiveView

featured_image

LiveView doesn’t support JavaScript interop at the moment (but it’s a planned feature), so in this article we see how to come up with a workaround to make LiveView playing together with a JavaScript library like Select2.

We see how to take advantage of phx:update ​ events, which LiveView dispatches every time it updates the DOM. Then we see how to send events to the server using liveSocket.

5 Likes

I’ve had similar issue keeping a JS library component initialized but have been too lazy to figure it out! Thank you for posting!

3 Likes

Hey everyone :blush:

After few busy months, I’m super happy to be back posting content weekly, starting with the first of a series of episodes for who wants to explore Phoenix LiveView and start building real-time web apps.

3 Likes

Hey all,

We’ve been working hard on building trykno.com over the last few months.
As we are built with Elixir it seems sensible that our first integration guide should be for elixir and phoenix.

(I’ve shared this on github because we thought it might need a library but in the end we didn’t build one so the README is simply an integration guide)

4 Likes

Hey!

This episode is focused on LiveView’s primitives, exploring the necessary bricks to build an app with this technology. A special look at what happens behind the scenes, understanding Life-cycle while inspecting websocket messages and DOM updates.

Hope you like it and that can be useful :blush: As always, please let me know if you have any question or feedback!

Alvise

1 Like

A post was split to a new topic: Understanding Phoenix LiveView: build a Gallery app (screencast)

3 Likes

Hi everyone, I was doing some research on how the request and response cycle works in phoenix? After doing lots of research and reading. I have written my own understanding of it. Here’s a link:-

Let me know if I can do some changes and if someone wants to discuss I’m open to that.

Thanks

1 Like

Hi elixir friends!

I’ve just published a quick post about LiveView and JS hooks with Select2. The previous version of this article was using different workarounds since JS hooks were not available. It’s now much easier to use select2 with LiveView.

1 Like

I’ve just published this integration guide adding passwordless authentication to your phoenix application
using the openid_connect library to integrate with DID.

DID.app is an Identity Provider, that authenticates users by verifying access to either an email address or securely stored private key.

Hi!

I made a tiny tiny contribution to the LiveView project (just two lines of code :slight_smile: available from release 0.5.0 ), which adds offsetX and offsetY coordinates to the click event metadata. These coordinates are useful to know exactly where the click happened inside the element.

In this article I show how to use phx-click and offsetX,Y coordinates, letting the user interacts with SVG elements.

2 Likes

Elixir Dynamic Queries

1 Like

Hi all.
In this blog post, I would like to present my findings on how to store and visualize GPX tracks using Elixir/Phoenix, PostgreSQL and a little bit of JavaScript.

3 Likes

Using custom fonts with Phoenix 1.4+ and Webpack is pretty straight-forward, but there seems to be a lot of pain online regarding asset directories so I wrote this:

1 Like

In case someone is interested: I wrote a short post about how to use Phoenix with Docker:
https://dwarfte.ch/2020/04/28/create-a-phoenix-app-using-docker/

1 Like

Wrote this post about how to monitor WebSocket disconnections:

2 Likes

I wrote one more Phoenix/Docker thing: Deploy a Phoenix app to Microsoft Azure with Docker

1 Like

Leveraging temporary assigns is a great way to optimize Phoenix LiveView. This post explores how to update/delete from temporary assigns in your LV.

4 Likes

Hey everyone,

I’m Tamas, Elixir/Typescript/React dev. I just published a guide about building a JSON API with Phoenix 1.5

Hope you’ll enjoy reading it! Let me know if you have any questions/feedback.

2 Likes

Hi,

I made an article a few days ago about authentication with Phoenix Framework.

Since I started using Elixir & Phoenix very recently, Feedbacks and suggestions are most welcome!