efstathiosntonas/react-native-style-libraries-benchmark

Shouldn’t the styles we provide inside the styledviews also use the respective ui styles.

Closed this issue · 10 comments

For ex in nativewind.js line 10, should have used classname prop to give similar tailwind styling not the default stylesheet one. That may give us more proper benchmark.

Hi @xerxiastudios, I think that according to this : https://nativewind.dev/api/styled adding className (or props) or use styled would be the same, right? I’ve never used Tailwind before so please correct me if I’m wrong.

Unless you mean to use styles directly in styled like styled-components.

Yes like the styled components. Like this

const StyledView = styled(View, 'flex-1 items-center justify-center')

You can also check how tamagui guys have made their benchmarks. They used library styling for making the views which will be more proper.

https://github.com/tamagui/tamagui/tree/24ac758bbe5d6ff2f67f25071df4286e0594f578/starters/benchmark/packages/app/features/user

I came to this from tamagui discussions Im building an alternative to NativeWind mixed a bit with styled components but I think the performance is better than original NW and SC (I made a css parser planned specially for RN but with original css features like pseudos, groups, css units etc...) im telling this to clone your repo and add my lib to see how it behavies agains the other libs here is the link if you want to check it out:
this pull will bring styled-components syntax to the lib (will be released this week)
react-universal/native-twin#114

@xerxiastudios I've updated it, now we're using baseClassName on the styled NativeWind hoc and Stack on Tamagui.

@chrisarts can you please post a response here when the PR is merged? thanks!

@efstathiosntonas to get faster response from Tamagui team you should post the issue in their discord.

@xerxiastudios thanks, will do!

you please post a response here when the PR is merged? thanks!

You can use the current version of the lib, updates are applied now, still need to work on a lot of documentation around the api usage but basically its styled components for TW.

Closing it. All views looking good.