Skip to content

Release 3.0.0-rc.4

Compare
Choose a tag to compare
@jpudysz jpudysz released this 13 May 10:42
· 149 commits to main since this release

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)

Bug Fixes

  • [Web] - don't reparse unistyle generated style (4ba0067)
  • [Windows] - restore babel plugin for windos (f91d838)
  • [Windows] - remove platform-specific path handling in JS resolution (623c5dd)
  • [SSR] - fix pressable (227d236)
  • [Core] - ts types for useAnimatedTheme (f231ba1)