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

3 hours ago

What's Changed

A stability release: theme changes that didn't reach some components, memory leaks on reload and on web, reload crashes, and build fixes for older React Native versions and AGP 9.

๐ŸŽจ Themes and styles

  • Fixed theme updates not applying to some dynamic styles after a re-render (#1267, closes #1192)
  • Unistyles commits no longer overwrite what React just rendered, which fixes updateTheme being lost when a theme is set on mount and inline props being dropped mid-transition (#1271)
  • Fixed stale colors on React Native Animated views when the style merges several unistyles (#1273)
  • Fixed animated variant colors staying stale after a theme change on a frozen screen (#1274)
  • Fixed TouchableHighlight reverting to the previous theme's style after a press (#1279)
  • ActivityIndicator style is now linked with its wrapping View (#1270)
  • useUnistyles, withUnistyles, Display and Hide react to orientation changes again, even when no stylesheet depends on them (#1265 by @christianjuth, closes #1254)
  • StyleSheet.absoluteFillObject stays a spreadable style object across React Native versions (#1237 by @dennytosp, closes #1200)

๐ŸงŠ Frozen screens

  • Unfreezing a screen no longer blocks JS for seconds: suspended nodes are restored without one shadow tree commit per node (closes #1252)

๐Ÿง  Memory and reloads

  • Fixed a StyleSheet โ†” Unistyle reference cycle that leaked memory on every reload (#1280)
  • Runtime ownership now uses generation tracking, so a stale runtime can no longer wipe the state of the new one after an OTA or dev reload (#1278, closes #1215 and #1250)
  • uni__getStyles throws a JSError instead of crashing when it races registry teardown during reload (#1221 by @safaiyeh, closes #1220)
  • Web: Pressable and ScrollView are now released from the shadow registry, so CSS rules and detached DOM nodes stop accumulating (#1277, closes #1263)

๐Ÿ›  Build and compatibility

  • Fixed the parseUnprocessedTransformOriginString build error on React Native < 0.85, with transformOrigin strings still processed on Android there (#1236 by @dennytosp, closes #1226)
  • Android: the explicit Kotlin plugin is skipped when AGP 9 registers the built-in kotlin extension (#1246 by @gabrieldonadel)
  • NativeText / NativeView host components are resolved without deep imports (#1272)

๐Ÿงพ Types

  • Readonly arrays are accepted in nested style props such as boxShadow (#1238 by @dennytosp, closes #1214)
  • Readonly style arrays stay valid on the output side as well (#1276)

โšก Performance

  • Faster lookup of unistyles on the link path, recovering the re-render cost added by the merged-style fix (#1275)

๐Ÿงช Internal

  • New e2e suite with C++ diagnostics for the example app (#1269), plus a docs refresh (#1268)

โค๏ธ Contributors

Thanks to everyone who sent a PR for this release:

And to those whose PRs and reports shaped the fixes:

Full Changelog: v3.4.0...v3.5.0

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

NewReleases is sending notifications on new releases.