Styled Components is a CSS-in-JS solution that enables you to create React components with a given style very easily. Using styled-components with Expo, you can create universal styles that'll work the same across web, mobile, and desktop!
Install the package:
Use styled-components/native instead of styled-components:
Now you can use styled-components/native just like you would in a regular Expo project!
Styled Components imports all of react-native-web which breaks React Native web tree-shaking. This means your bundle size will be larger and include all of the components exported from react-native-web.
Technically you can use styled-components directly like this: