You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// From https://github.com/mrousavy/nitro/blob/afa41bae947ecf738c33569ead42eaf0825cc6d5/packages/react-native-nitro-modules/cpp/core/BoxedHybridObject.hpp
4
+
// TODO: should be removable once migrated to nitro modules + RNW supporting nitro HybridObjects
5
+
//
6
+
7
+
#pragma once
8
+
9
+
#include"RNFHybridObject.h"
10
+
#include<jsi/jsi.h>
11
+
#include<memory>
12
+
13
+
namespacemargelo {
14
+
15
+
usingnamespacefacebook;
16
+
17
+
/**
18
+
* Represents a `HybridObject` that has been boxed into a `jsi::HostObject`.
19
+
*
20
+
* While `HybridObject`s are runtime agnostic, some threading/worklet libraries do not support copying over objects
21
+
* with `jsi::NativeState` and a prototype chain (which is what a `HybridObject` is), so Nitro offers support for
22
+
* boxing those `HybridObject`s into a type that those libraries support - which is a `jsi::HostObject`.
23
+
*
24
+
* Simply call `unbox()` on this `jsi::HostObject` from the new Runtime/context to get the `HybridObject` again.
25
+
*/
26
+
classRNFBoxedHybridObjectfinal : public jsi::HostObject {
0 commit comments