Ocean Meditation

Morning ocean blowing breezes Rising sun glows on horizon Rolling emerald whitecap waves Smelling fresh ocean salty air Gulls gliding low above the surf. Feeling calm with inner peace Soothing…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Perfect styling library for React Native

Working with Tailwind CSS in React Native

We are available to help you out to transform your idea into a reality. Email us or reach the website to connect.

I have used Tailwind CSS for my React projects and I can certainly make lots of points why I prefer it always over styled components also. I was wondering then can I use Tailwind CSS with React Native.

I have found a package that endorses styling our components in React Native using Tailwind CSS.

If you have developed a component in React Native then you can probably relate a bit, for creating a component in React Native we have 2 methods to provide styling-

Both the methods are correct but they have a big DEVELOPMENT HURDLE in my opinion. The former method one makes the content of a single file too long to read and maintain, the developer needs to scroll a lot plus difficult to manage sometimes and the latter method makes repository too cluster in terms of a number of files won't be good enough for the small application and even large application for different types of Button you have different types of styling files, not a good approach.

The first step is to add the tailwind package for react-native using the below command.

Followed by creating a tailwind-config.js file in the root directory and add basic configurations to it.

Add a comment

Related posts:

An Example Blog Post Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel quam laoreet magna aliquam rutrum vel a orci. Aenean tincidunt ut felis quis sollicitudin. Morbi volutpat metus nibh, interdum…

Identidade Visual

As cores utilizadas na identidade visual foram inspiradas diretamente no Twister. O tapete do jogo possui quatro diferentes cores: amarelo, verde, azul e vermelho, em um fundo branco. Sendo assim…

A Sick Joke About Economists

The joke is that Economics is a pointless, completely unscientific discipline and that economists are worthless, clueless people with not the faintest idea about how real economies work or about how…