Master 'Dark Mode Toggle' Using Shadcn-ui and Remix - A Practical Guide

preview_player
Показать описание
A detailed guide on implementing applying Dark Mode to your SSR apps using Remix and Shadcn-ui.

Timecodes
0:00 - Intro
1:12 - Requirements of a dark-mode toggle
2:30 - Using next-themes
4:30 - How does next-themes work ?
6:05 - Client preference cookies
7:35 - Client-hint cookie concept
8:37 - Using ch-cookie based on epic-stack
13:04 - Pros of using cookies
14:19 - Tradeoffs
Рекомендации по теме
Комментарии
Автор

👍 Very detailed explanation. Although the cookie implementation seems like more effort, I think it scales well. I added a `time zone` client hint so the server can render date/time correctly. It's always helpful when the server has all the information it needs up front to render the page vs potential "flash of incorrect content" on the client.

Kiliman
Автор

Was just struggling with this, thank you!

runever
Автор

Pretty cool! More remix run videos will be appreciated, also and example how to implement remix and shadcn ui" Data Table" from "tanstack/table/v8", that will be awesome!!! 👌

NunoCostapt
Автор

Does Remix has something like "Partial Prerendering" like Nextjs 14 ?

zunnoorainrafi
Автор

How I wish it wasn't so complicated 😭

mailok