diff --git a/releases/next/docs/native-modules-ios.html b/releases/next/docs/native-modules-ios.html index 5b35716cd07..1bc81029428 100644 --- a/releases/next/docs/native-modules-ios.html +++ b/releases/next/docs/native-modules-ios.html @@ -77,7 +77,14 @@ CalendarManager. // You can invoke callback from any thread/queue callback(@[...]); }); -}
NOTE: Sharing dispatch queues between modules
The
methodQueuemethod will be called once when the module is initialized, and then retained by the bridge, so there is no need to retain the queue yourself, unless you wish to make use of it within your module. However, if you wish to share the same queue between multiple modules then you will need to ensure that you retain and return the same queue instance for each of them; merely returning a queue of the same name for each won't work.
A native module can export constants that are immediately available to JavaScript at runtime. This is useful for communicating static data that would otherwise require a round-trip through the bridge.
NOTE: Sharing dispatch queues between modules
The
methodQueuemethod will be called once when the module is initialized, and then retained by the bridge, so there is no need to retain the queue yourself, unless you wish to make use of it within your module. However, if you wish to share the same queue between multiple modules then you will need to ensure that you retain and return the same queue instance for each of them; merely returning a queue of the same name for each won't work.
The bridge initializes any registered RCTBridgeModules automatically, however you may wish to instantiate your own module instances (so you may inject dependencies, for example).
You can do this by creating a class that implements the RTCBridgeDelegate Protocol, initializing an RTCBridge with the delegate as an argument and initialising a RTCRootView with the initialized bridge.
A native module can export constants that are immediately available to JavaScript at runtime. This is useful for communicating static data that would otherwise require a round-trip through the bridge.
JavaScript can use this value right away, synchronously:
Note that the constants are exported only at initialization time, so if you change constantsToExport values at runtime it won't affect the JavaScript environment.
Enums that are defined via NS_ENUM cannot be used as method arguments without first extending RCTConvert.
In order to export the following NS_ENUM definition: