ReactModule

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ReactModule(val name: String, val canOverrideExistingModule: Boolean = false, val needsEagerInit: Boolean = false, val hasConstants: Boolean = true, val isCxxModule: Boolean = false)

Annotation for use on com.facebook.react.bridge.BaseJavaModules to describe properties for that module.

Properties

Link copied to clipboard

True if you intend to override some other native module that was registered e.g. as part of a different package (such as the core one). Trying to override without returning true from this method is considered an error and will throw an exception during initialization. By default all modules return false.

Link copied to clipboard
val hasConstants: Boolean = true

Whether this module has constants to add, defaults to true as that is safer for when a correct annotation is not included

Link copied to clipboard
val isCxxModule: Boolean = false

Indicates if a module is a C++ module or a Java Module

Link copied to clipboard

Name used to require() this module from JavaScript.

Link copied to clipboard
val needsEagerInit: Boolean = false

Whether this module needs to be loaded immediately.