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
ScopedThemeshowed the old global theme the first time it mounted outside the scope aftersetTheme(). 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)withUnistylesnow fully flattens deeply nestedstyleandcontentContainerStylearrays, 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.screenwas0 x 0andpixelRatiowas1when iOS launched the app in the background (e.g. from a push notification or background fetch). They now fall back toUIScreen, like React Native'sDimensions(#1291 by @Noitham, closes #1290)
🌐 Web
pointerEvents: 'box-none'and'box-only'now work. Before, they were written to CSS as invalid values, so abox-noneoverlay blocked clicks on everything under it (#1299, supersedes #1255)- Child styles generated by
withUnistylesno 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:
- @exzos28 (#1255), whose pointerEvents fix is the base of #1299
- @thomascoumau, @waraness99 for detailed bug reports
Full Changelog: v3.5.2...v3.5.3