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

8 hours ago

What's Changed

A patch release: mounting and theme changes are faster than in 3.3.0 again, Android adaptive themes follow the system setting on time, and several stale theme and style fixes for ScopedTheme, <Activity> and web.

⚡️ Performance

  • 3.5.x made mounting and theme changes about 10–20% slower than 3.3.0. They are now faster than in 3.3.0 on both platforms (#1298)
3.3.0 3.5.2 3.5.3
iOS render 56.91 63.33 54.79
iOS theme change 51.87 55.32 47.62
Android render 71.03 87.23 69.47
Android theme change 53.26 60.27 49.00

Median ms, same run per platform

🎨 Themes and styles

  • A style used only under ScopedTheme showed the old global theme the first time it mounted outside the scope after setTheme(). It now shows the current theme (#1296 by @uncoolclub)
  • useUnistyles() no longer keeps the old theme when the theme changed while its component was hidden by <Activity mode="hidden">. The hook catches up when the content is shown again (#1300, closes #1297)
  • withUnistyles now fully flattens deeply nested style and contentContainerStyle arrays, like #1287 did for regular components. Before, styles nested two or more levels deep could be dropped (#1292 by @domeknn)

🤖 Android

  • With adaptiveThemes, toggling system dark mode no longer leaves the app one theme behind. Color scheme, font scale, pixel ratio, orientation, screen size, RTL and inset density are now read from the current Activity's resources, and the runtime refreshes when the app resumes (#1294 by @uncoolclub, closes #1293)

🍏 iOS

  • UnistylesRuntime.screen was 0 x 0 and pixelRatio was 1 when iOS launched the app in the background (e.g. from a push notification or background fetch). They now fall back to UIScreen, like React Native's Dimensions (#1291 by @Noitham, closes #1290)

🌐 Web

  • pointerEvents: 'box-none' and 'box-only' now work. Before, they were written to CSS as invalid values, so a box-none overlay blocked clicks on everything under it (#1299, supersedes #1255)
  • Child styles generated by withUnistyles no longer leak into the children of a plain view that uses the same style (#1231 by @giaBaoJS, closes #1198)

❤️ 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.2...v3.5.3

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

NewReleases is sending notifications on new releases.