khevamann / rn-responsive-styles

Responsive styles for react-native and react-native-web
MIT License
39 stars 3 forks source link

Upgrade sample to Expo 49 and fix warnings #23

Open khevamann opened 9 months ago

khevamann commented 9 months ago

This package now produces warnings about Stylesheet.compose when running in a project with Expo 49. These warnings should be addressed, and dependencies should be updated.

sdg9 commented 9 months ago

I'm new to using this repo but looks like it's this line that causes it https://github.com/khevamann/rn-responsive-styles/blob/c13e27e188226527053f19bcbae7216f62567a4e/src/hooks/useResponsiveStyle.ts#L15

I think it's as simple as changing it to

return [styles[classNames[0]], nextIteration];