jaredh159 / tailwind-react-native-classnames

simple, expressive API for tailwindcss + react-native
2.08k stars 84 forks source link

`h-screen` is not a valid Tailwind class name #231

Closed kmyn closed 1 year ago

kmyn commented 1 year ago

Hi,

I'm seeing a warning when using h-screen - WARNh-screenis not a valid Tailwind class name

Using h-full works. Is usage of h-screen invalid?

Code -

import React from 'react';
import { View, Text } from 'react-native';
import tw from 'tailwind-react-native-classnames';

const ExampleComponent = () => {
  return (
    <View style={tw`flex items-center justify-center h-screen`}>
      <Text style={tw`text-lg font-bold text-blue-500`}>Hello, Tailwind!</Text>
    </View>
  );
};

export default ExampleComponent;

Thanks.

jaredh159 commented 1 year ago

looks like you're problem is that you've installed the library incorrectly, using it's old npm package name, run this and you should be good:

npm uninstall tailwind-react-native-classnames
npm install twrnc

twrnc is the current name of the project on npm.