Skip to content

How is ReactNative's CodeGen and JSI fundamentally different from NativeScript's metadata service and type marshalling? #9921

Answered by shirakaba
shudv asked this question in Q&A
Discussion options

You must be logged in to vote

I'll summarise what I know about the React Native approach just to get everyone on the same page. For the NativeScript side of things, I'll write up my working understanding, but any experts are welcome to correct details!

Marshalling in React Native

The old way: a relatively simple JSON bridge

In React Native, the old way of communicating was via a JSON bridge. The native side would accept JSON messages from the JS side, and vice versa, and you could set up each side to react to those messages however you'd like. The limitation being that only JSON-serialisable data types could be sent over the bridge.

The new way: direct marshalling via JSI

The new way is via the JavaScript Interface (J…

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@shudv
Comment options

@shirakaba
Comment options

@farfromrefug
Comment options

@shudv
Comment options

@NathanWalker
Comment options

Answer selected by shudv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants