react-native-unistyles 2.40.0 → 2.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,7 +27,13 @@ Java_com_unistyles_UnistylesModule_nativeInstall(JNIEnv *env, jobject thiz, jlon
27
27
  return throwKotlinException(env, "Something went wrong while initializing UnistylesModule");
28
28
  }
29
29
 
30
- unistylesRuntime = std::make_shared<UnistylesRuntime>(*runtime, callInvoker);
30
+ auto runOnJSThread = [callInvoker](std::function<void(jsi::Runtime&)>&& callback) {
31
+ callInvoker->invokeAsync([callback = std::move(callback)](jsi::Runtime &rt) {
32
+ callback(rt);
33
+ });
34
+ };
35
+
36
+ unistylesRuntime = std::make_shared<UnistylesRuntime>(runOnJSThread);
31
37
  makeShared(env, unistylesModule, unistylesRuntime);
32
38
 
33
39
  jsi::Object hostObject = jsi::Object::createFromHostObject(*runtime, unistylesRuntime);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-unistyles",
3
- "version": "2.40.0",
3
+ "version": "2.41.0",
4
4
  "description": "Level up your React Native StyleSheet",
5
5
  "scripts": {
6
6
  "test": "jest",