diff --git a/packages/react-native-reanimated/Common/cpp/worklets/SharedItems/Shareables.cpp b/packages/react-native-reanimated/Common/cpp/worklets/SharedItems/Shareables.cpp index edde6ff9aafc..357e00548c74 100644 --- a/packages/react-native-reanimated/Common/cpp/worklets/SharedItems/Shareables.cpp +++ b/packages/react-native-reanimated/Common/cpp/worklets/SharedItems/Shareables.cpp @@ -233,7 +233,7 @@ ShareableObject::ShareableObject( jsi::Value ShareableObject::toJSValue(jsi::Runtime &rt) { auto obj = jsi::Object(rt); for (size_t i = 0, size = data_.size(); i < size; i++) { - obj.setProperty(rt, data_[i].first.c_str(), data_[i].second->toJSValue(rt)); + obj.setProperty(rt, jsi::String::createFromUtf8(rt, data_[i].first), data_[i].second->toJSValue(rt)); } #if SUPPORTS_NATIVE_STATE if (nativeState_ != nullptr) {