Skip to content

Lazy rootViewFactory property is defined but not used #138

@25harsh

Description

@25harsh

Hey correct me if im wrong but this lazy property isnt used

lazy private var rootViewFactory: RCTRootViewFactory? = {
return reactNativeFactory?.rootViewFactory
}()
/**
* Starts React Native with default parameters.
*/
@objc public func startReactNative() {
startReactNative(onBundleLoaded: nil)
}
@objc public func view(
moduleName: String,
initialProps: [AnyHashable: Any]?,
launchOptions: [AnyHashable: Any]? = nil
) -> UIView? {
reactNativeFactory?.rootViewFactory.view(
withModuleName: moduleName,
initialProperties: initialProps,
launchOptions: launchOptions
)
}

shouldnt it be like

@objc public func view(
  moduleName: String,
  initialProps: [AnyHashable: Any]?,
  launchOptions: [AnyHashable: Any]? = nil
) -> UIView? {
  rootViewFactory?.view(
    withModuleName: moduleName,
    initialProperties: initialProps,
    launchOptions: launchOptions
  )
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions