jpudysz / react-native-unistyles

Level up your React Native StyleSheet
https://unistyl.es
MIT License
1.42k stars 40 forks source link

feat: remove undefined transforms #272

Closed jpudysz closed 1 month ago

jpudysz commented 1 month ago

Summary

It seems that at some point there was a change in the core of React Native, and we can't longer return following objects:

<View
  style={{
    transform: [
       { scale: undefined }
    ]
  }}
/>

but its possible with breakpoints eg.:

{
    transform: [
       { 
         scale: {
           md: 1,
           lg: 2   
         }
       }
    ]
  }

and our breakpoint is sm.

This PR simply filters transforms that are undefined.

This can for sure be reproduced with RN 0.74 and RN 0.75

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-unistyles-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 10:12am