Releases: jpudysz/react-native-unistyles
Release 3.0.0-beta.1
Introducing Unistyles 3.0!
Read more: https://www.reactnativecrossroads.com/posts/unistyles-3-preview
Migration guide: https://www.unistyl.es/v3/start/migration-guide
New docs: https://www.unistyl.es
Check changelog: Changelog
Release 2.20.0
Release 2.12.0
Release 2.11.0
Release 2.10.0
2.10.0 (2024-10-02)
Features
UnistylesRuntime.getTheme() // <-- get current theme
UnistylesRuntime.getTheme('dark') // <-- get theme by name
Theme returned from UnsityelsRuntime
will reflect all changes you made with UnistylesRuntime.updateTheme
, so it's better than importing theme from file.
- [Web] Migrate from webpack to metro, upgrade expo example to 0.75.3 (e99d65a)
- [Android] Prevent keyboard controller to report new ime insets when listener is disabled (7f0ccc4)
This works well with following setting:
UnistylesRegistry
.addConfig({
disableAnimatedInsets: true
})
- [Android] Upgrade cmake (422293a)
Bug Fixes
- [iOS] Set root view background color on ui thread (a3b7b0f)
Release 2.9.2
2.9.2 (2024-08-30)
This is a small release that addresses some issues.
- Thanks to @LeeMoonki, Unistyles 2.9.2 again supports React Native 0.72!
- Unistyles will now reject
transform
withundefined
values
<View
style={{
transform: [
{ scale: undefined }
]
}}
/>
This used to work in the past but was changed in the React Native core. Developers can easily reproduce this issue when using, for example, media queries or breakpoints.
- Disabling bottom inset animations
Some users reported poor performance and unnecessary re-renders when Unistyles attempted to animate the values of insets.bottom
on Android (eg. when toggling keyboard).
This default behavior can now be disabled using UnistylesRegistry
:
UnistylesRegistry
.addConfig({
disableAnimatedInsets: true // android only
})
Features
- [Android] - add support back for React Native 0.72 - fix JSI issue (21301cf) by @LeeMoonki
- [Android] add option to disable animated insets (908fdd2)
- [Core] remove undefined transforms (6d6245b)
Docs
Release 2.9.1
2.9.1 (2024-07-31)
This is a small update with a few improvements from the community!
- Detecting RTL on the web is now dynamic and doesn't require a page reload
- Fixed a race condition for iOS core, where reading values from
UnistylesRuntime
could return default values
Features
- [Web] add support for updating rtl on web (3954c3d) by @TheUltDev
- [iOS] await initial values while initializing ios core (c8e3466)
- [TypeScript] export UnistylesTheme (cbc6024) by @yzhe554
Release 2.9.0
2.9.0 (2024-07-20)
Use hairlineWidth
and rtl
in UnistylesRuntime
and miniRuntime
:
const stylesheet = createStyleSheet((theme, rt) => ({
container: {
backgroundColor: theme.colors.background,
borderBottomWidth: rt.hairlineWidth, // the thinnest visible width on the platform
justifyContent: rt.rtl ? 'flex-end' : 'flex-start' // detects if user prefers RTL or LTR direction
}
}))
Features
- [Core] add support for rtl (ea128f5)
- [TypeScript] export UniStyle(View|Text|Image) types (c779713) by @yzhe554
- [Core] implement hairlinewidth (c6913ef)
Deprecation
- [Core] Deprecate plugins (2bddd97)
Bug Fixes
- [Core] cycle import (e64a92d)
Docs
- [Docs] Mention KeyboardAvoidingView with edge to edge layout 4fdccfa