diff --git a/docs/nativemodulesios.html b/docs/nativemodulesios.html index 33621c475ec..d0e1de39727 100644 --- a/docs/nativemodulesios.html +++ b/docs/nativemodulesios.html @@ -58,7 +58,24 @@ CalendarManager.}
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.
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.
The native module can signal events to JavaScript without being invoked directly. The easiest way to do this is to use eventDispatcher:
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:
You must create a class extension of RCTConvert like so:
You can then define methods and export your enum constants like this:
Your enum will then be automatically unwrapped using the selector provided (integerValue in the above example) before being passed to your exported method.
The native module can signal events to JavaScript without being invoked directly. The easiest way to do this is to use eventDispatcher: