Elixir Mentor

Gustavo Oliveira on Tailwind in Phoenix

10 snips
Feb 17, 2024
Gustavo Oliveira, a full-stack Elixir educator and creator behind ELXPRO and a YouTube channel. He talks about Tailwind becoming default in Phoenix 1.7 and why that simplifies setup. Short takes on common Tailwind pitfalls, layout strategies for LiveView, reusable function components, and tooling like Tailwind IntelliSense. Practical tips for learning Flexbox and Grid and avoiding blind copy-paste.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
ANECDOTE

From Java To Real-Time Elixir Projects

  • Gustavo moved from Java to Elixir after struggling with functional programming early on.
  • He built real-time PDF handling and scaled jobs like hashing one million records using Kafka and Elasticsearch.
ADVICE

Favor Utilities Over Excessive @apply

  • Use Tailwind's defaults and avoid overusing @apply to prevent CSS bugs and complexity.
  • Keep styles simple and prefer utility classes unless a pattern is truly repetitive.
ADVICE

Keep Root Minimal, Put Live UI In App

  • Put minimal global layout in root and keep the app LiveView file for UI elements that need socket data.
  • Move real-time components (like a cart) into app so they can access the socket and update properly.
Get the Snipd Podcast app to discover more snips from this episode
Get the app