NativeWind는, react native에서도 tailwind를 쓰기위한 라이브러리다.
App.jsx에만 className="text-lg bg-red-500" 같이 tailwind css가 적용되는 문제가 있었고, 그 안에 다른 폴더들의 jsx파일은 적용이 안되었다.
이유는..
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./App.{js,jsx,ts,tsx}",
"./components/*.{js,jsx,ts,tsx}",
"./components/**/*.{js,jsx,ts,tsx}",
"./screens/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {},
},
plugins: [],
};
다음과 같이 tailwind.config.js 에 tailwind를 적용할 파일들을 다 명시해줘야한다..!
원래는 App.jsx 경로만 있었다.
게다가, 명시해주고 캐시를 지우기 위해 expo start -c 를 해준 뒤, 다시 실행하면 잘된다..
즐거운 삽질이었다..!ㅜㅜ
멋있는 삽질이네욤!