Phoenix Files: Browsing page 2 of 2

By Mark Ericksen

Passing Unknown Attributes Into Your Component

On your LiveView page, you are using a custom component. You want to be able to pass HTML attributes into the component, but the component doesn't know anything about the attributes being passed! You need a way to pass arbitrary attributes through...

Read more 

Read more
By Mark Ericksen

Restore LiveView State on Startup

You are storing some LiveView state in the browser. You want to retrieve that saved state as early as possible to improve the user experience. How can you do that? ProblemThe approach in Saving and Restoring LiveView State waits for the LiveView ...

Read more 

Read more
By Chris McCord

Tailwind Standalone for Phoenix

Tailwind v3 was just released with some great new additions. One such feature is a new "standalone" tailwindcss CLI that includes pre-built binaries for all major platforms. This enables all of Tailwind's great features without the dependency on n...

Read more 

Read more
By Berenice Medel

Active Nav With LiveView

One of the most important challenges when we are developing a new website is to give the user a great navigation experience, the user must know where they are and what navigation options they have at their disposal within the website. For this we ...

Read more 

Read more
By Mark Ericksen

Saving and Restoring LiveView State

There are multiple ways to save and restore state for your LiveView processes. You can use an external cache like Redis, your database, or even the browser itself. Sometimes there are situations, like I described previously, where you either can't...

Read more 

Read more
By David Bernheisel
Intro

Safe Ecto Migrations

As an Elixir developer who cares about system up-time and avoiding "scheduled maintenance" windows, and more importantly avoiding "unscheduled maintenance" windows 😉, this guide dives deep into Ecto database migrations and how they can be used saf...

Read more 

Read more
Safe Ecto Migrations
Part 1

Anatomy of an Ecto Migration

In order for us to create and run safe Ecto migrations on our database, it is helpful to understand what is _actually_ happening with the database. To do that, we'll dig deeper into how Ecto migrations work by looking both at the code being execut...

Read more 

Read more
Safe Ecto Migrations
Part 2

How to Migrate Mix Release Projects

Not long ago, deploying and managing Elixir projects was not as straight-forward as today; some might say it was downright painful. Thankfully, since Elixir 1.9, Mix ships with tools to help developers assemble applications for deployment.

Read more 

Read more
Safe Ecto Migrations
Part 3

Migration Recipes

This is a non-exhaustive guide on common migration scenarios and how to avoid trouble. These migration recipes may evolve over time, so be sure to check the git edition of these recipes at https://github.com/fly-apps/safe-ecto-migrations with up-t...

Read more 

Read more
Safe Ecto Migrations
Part 4

Backfilling Data

When I say "backfilling data", I mean that as any attempt to change data in bulk. This can happen in code through migrations, application code, UIs that allow multiple selections and updates, or in a console connected to a running application.

Read more 

Read more