Skip to content

Releases: jpudysz/react-native-unistyles

Release 2.5.4

05 Apr 10:33

Choose a tag to compare

2.5.4 (2024-04-05)

Small release to improve some edge cases for Android 🤖 apps

Bug Fixes

  • dont trigger layout config change on app resume (baec341)

Release 2.5.3

03 Apr 15:15

Choose a tag to compare

2.5.3 (2024-04-03)

Unistyles will now correctly initialize in headless mode (e.g. when a push notification wakes the Android app) 🤖

Features

Release 2.5.2

02 Apr 15:03

Choose a tag to compare

2.5.2 (2024-04-02)

Features

Android devices with a notch (cutout) could receive two initial events regarding the insets. This occurred because currentActivity was null when Unistyles was calculating insets for UnistylesRuntime. This update should resolve the issue 💪

  • mark platform extension for insets as lateinit to help reducing number of events (d68b6a5)

Release 2.5.1

27 Mar 08:24

Choose a tag to compare

2.5.1 (2024-03-27)

Features

Unistyles ❤️ bridgeless, and I can confirm that it will work with React Native 0.74 out of the box. Just keep in mind that Bridgeless + 0.73 may not be supported, as the React Native Core team included a lot of improvements during the RC phase.

  • add new arch + bridgeless example (0399493)

Bug fixes

  • add support for array-based fontVariants (f85af90)

Release 2.5.0

15 Mar 09:06

Choose a tag to compare

Features

const stylesheet = createStyleSheet((theme, runtime) => ({
  // Use runtime from arguments instead of importing from react-native-unistyles
}));

Fixes

  • Fixed an issue causing errors about duplicate plugins to be thrown while hot-reloading in development mode. [chore: stop throwing errors for duplicated plugins in dev mode PR

Release 2.5.0-rc.0

09 Mar 21:11

Choose a tag to compare

Release 2.5.0-rc.0 Pre-release
Pre-release

2.5.0-rc.0 (2024-03-09)

Bug Fixes

  • docs: fix code highlight for layout (ca4752c)

Features

  • add library mocks (cc1784b)
  • expose a secondary layout argument in createStyleSheet (cec4b45)
  • make mocks dynamic (f9840f3)
  • replace layout arg with runtime (b11fd74)

Release 2.4.0

27 Feb 19:51

Choose a tag to compare

2.4.0 (2024-02-27)

Introducing the new version of Unistyles, and this one is significant!
Thank you for your patience, as it took me some time to complete it.

Built-in Safe Area Insets

This feature enables you to use insets values without the need for the react-native-safe-area-context package and passing any value to your stylesheet. Unistyles will automatically update your stylesheets with fresh values straight from C++!

You can access the new API with UnistylesRuntime:

const stylesheet = createStyleSheet(theme => ({
    header: {
         // will always be up-to-date
         paddingTop: UnistylesRuntime.insets.top
    }
}));

Insets expose 4 values: top, bottom, left, and right.

Status Bar and Navigation Bar

You can now also access some metadata about the status bar and navigation bar. Unistyles exposes their dimensions. They will always be up to date, and you can use them directly in the stylesheet with UnistylesRuntime:

UnistylesRuntime.statusBar.height // or width
UnistylesRuntime.navigationBar.width // or height

Content Size Category Improvements

The content size category is a user preference used to adjust the text size in your app. This feature is especially useful for users with visual impairments or limited vision. I've introduced new accessibility values for iOS: accessibilityMedium, accessibilityLarge, accessibilityExtraLarge, accessibilityExtraExtraLarge, accessibilityExtraExtraExtraLarge

Android has also received new values for very large fonts: extraHuge, extraExtraHuge.

You can access the Content Size Category with UnistylesRuntime:

UnistylesRuntime.contentSizeCategory

Redesigned Android Architecture

You can expect fewer re-renders and better performance. Unistyles is now smarter and can distinguish what has changed and emit only necessary events. This was not supported from the beginning, as Android has no dedicated events for orientation, dark mode, and content size category changes.

x64 Builds for Windows

Version 2.3.0 brought you support for react-native-windows. I was creating a bridge on my macOS computer with Parallels. I missed some configurations, and Unistyles wouldn’t compile on Windows computers. It’s now fixed, and you can develop cross-platform apps on your personal PC.

Fix for Rare Android Crash on Some Devices

That was tough to spot, as it happened rarely, but due to a race condition, Android reported some events faster than Unistyles was able to initialize. You can now enjoy a new bug-free version!

Docs Improvements

You can explore a new section about Dimensions and read some new guides. I marked the new content with a NEW badge.

Docs

Release 2.4.0-rc.2

27 Feb 14:33

Choose a tag to compare

Release 2.4.0-rc.2 Pre-release
Pre-release

2.4.0-rc.2 (2024-02-27)

Bug Fixes

  • issue with not reporting fresh insets on cpp layer (1b4e04c)

Features

  • finish android implementation (092047b)
  • get visible react android (6cf96a7)
  • reduce number of re-renders for android (0eb3909)
  • refactor dimensions (ece20c5)
  • update content size category and navigation bar api (8247eb1)

Release 2.4.0-rc.1

15 Feb 13:51

Choose a tag to compare

Release 2.4.0-rc.1 Pre-release
Pre-release

2.4.0-rc.1 (2024-02-15)

Features

  • widnows add support for x64 builds (1042417)

Release 2.4.0-rc.0

14 Feb 10:05

Choose a tag to compare

Release 2.4.0-rc.0 Pre-release
Pre-release

2.4.0-rc.0 (2024-02-14)

Features

  • add insets to windows (8831626)
  • add support for insets and status bar metadata (dcee0fe)
  • improve android implementation (80fe82e)