Skip to content

Multiples Components best practices: sharing bridge? #1073

@finalquest

Description

@finalquest

Hi again.
The context first:

Im using RN as the V in MVC. I've created a JS with a RN component, created a UIView in the obj-c side, and use a RCTRootView (initWithBridge) as a subview.
Everything works fine.

Now the question.
Suppose that I have a two RN components, in two JS files (DetailView.js, SomeOtherView.js).
Is there a way to make a single JS file with the 2 components, so I can use only one bridge and share it. I dont really understand how can I achieve this, and use initWithBridge: moduleName:

Sorry if is a super noob question.
Thanks and regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions