Release 3.0.0-rc.4
3.0.0-rc.4 (2025-05-13)
This release brings us one step closer to a stable release. We were able to clean up all the issues and implement the requested features!
Read theme in Reanimated Worklets
You can now read the theme
in worklets
, e.g., with useAnimatedTheme
π.
import { useAnimatedTheme } from 'react-native-unistyles/reanimated'
const theme = useAnimatedTheme()
const style = useAnimatedStyle(() => ({
backgroundColor: theme.colors.background
}))
useAnimatedTheme
returns the Unistyles theme
as a SharedValue
, which means it won't re-render your component on theme change, but will re-trigger the worklet!
Read more: https://www.unistyl.es/v3/guides/reanimated
Build cross-platform apps without react-native-web
It's now possible to completely skip RNW. Unistyles will handle all style logic, and you're responsible only for the component implementation:
import { getWebProps } from 'react-native-unistyles/web-only'
const { ref, className } = getWebProps(style)
// ref - will remove your className from document when component unmounts
// className - first class CSS classname represents all your styles
Read more: https://www.unistyl.es/v3/guides/custom-web
Features
- [C++] - Shadow Tree perf improvements (152aedf)
- [Core] - Add support for reading Unistyles theme in Reanimated (d5e64ec)
- [Web] - Web only components (a45904f)
Docs
- [Docs] - Add docs for static frameworks (56ffee9)
- [Docs] - Add docs about reanimated integration (be8913f)
- [Docs] - Add docs about
getWebProps
(c9dece0)