github jpudysz/react-native-unistyles v3.5.1
Release v3.5.1

4 hours ago

What's Changed

A patch release: a build fix for React Native 0.88, a crash fix for animated refs, a safety guard for styles read inside worklets, and fixes for Jest mocks and web.

๐Ÿ›  Build and compatibility

  • Fixed the iOS and Android build error on React Native 0.88, where ImageProps::tintColor became optional (#1282, closes #1281)

๐Ÿ’ฅ Crashes

  • Fixed the Object is not a function crash in passForwardedRef when a ref callback returns a value that isn't a cleanup function, e.g. useAnimatedRef() on a Unistyles component. Forwarded refs are now detached with null on unmount, like React does (#1283, closes #1207)
  • Reading StyleSheet styles inside a worklet (e.g. useAnimatedStyle(() => ({ ...styles.box }))) now throws a clear error instead of reading another runtime's memory, which could crash the app or return garbage values. Pass styles next to the animated style instead (style={[styles.box, animatedStyle]}), and use useAnimatedTheme to read the theme in a worklet (#1284, found while investigating #1213)

๐ŸŒ Web

  • ListHeaderComponentStyle and ListFooterComponentStyle are now applied on FlatList, SectionList and VirtualizedList (#1248 by @Vadko)
  • Fixed a blank page in browsers without the Screen Orientation API, such as Safari 16.3 and older; orientation falls back to the viewport there (#1219 by @theonetheycallneo, closes #1073)

๐Ÿงช Testing

  • The Jest mock registry is now stored on globalThis, so it survives jest.resetModules() and duplicate package copies (#1240 by @sohammondal, closes #1239)

โค๏ธ Contributors

Thanks to everyone who sent a PR for this release:

And to those whose PRs and reports shaped the fixes:

Full Changelog: v3.5.0...v3.5.1

Don't miss a new react-native-unistyles release

NewReleases is sending notifications on new releases.