Skip to content

JSExport'd objects (or alternative) aren't supported #15367

Closed
@mhuusko5

Description

@mhuusko5

Currently the native bridge is 1) very simple (lump modules) 2) boilerplate heavy (macros/wrappers for desired exports, objects/data needing JSONification) 3) limited to Obj-C (or Swift wrapped/de-typed in Obj-C)

#1 and #2 could be solved by supporting the native JavaScriptCore JSExport protocol functionality, so that arbitrary Obj-C objects are passable to/interactable from JS land. If this is possible as a short term measure, it would be very valuable.

But I imagine a fine grained, full, automatic bridge unique to RN could be (and would need to be, to provide the same functionality for Android) developed in the longer term, given the skill/knowledge base that participates in this project.
I'm imagining, for example, a native bridge between JS<->Obj-C, TS<->Swift that's code-gen'd for full support of each's interfaces/lang features. Has something like this ever been played with?

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