EvanBacon / expo-router-tailwind-demo

Demo of using Expo Router with Tailwind in a website bundled using Metro

Home Page:https://expo-tailwind.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expo Router Tailwind web Example

Use expo-router with tailwind in Metro web apps.

This approach does nothing on native as native does not currently support CSS.

How it works

This project is Expo SDK +49

  1. The Tailwind CLI is started in the metro.config.js file, this is where file watching and updating happens.
  2. The index.js optionally imports the evaluated CSS file from tailwind CLI. This ensures that HMR updates are applied, and the CSS is bundled.
  3. A global.css file adds the requisite utility classes for Tailwind to work.
  4. The metro.config.js has experimental Expo CSS enabled.
  5. The app.json has web.bundler set to metro.

📝 Notes

About

Demo of using Expo Router with Tailwind in a website bundled using Metro

https://expo-tailwind.netlify.app/


Languages

Language:JavaScript 98.5%Language:CSS 1.5%