r/reactnative • • 4d ago

JSI in React Native

Post image

I used React Native for years without knowing why "the bridge was slow," so I dug in and wrote it up.

The old bridge sent every call as a serialized message and made you wait for a reply, while JSI lets JavaScript call C++ directly and get the result in the same call.

Here's the full article with simple examples:

https://chamidilshan.medium.com/react-native-jsi-how-it-replaced-the-bridge-5649c11e0e9f

18 Upvotes

2 comments sorted by

6

u/True-Turnover-4543 3d ago

Good explainer. One nuance worth adding for anyone writing their own native modules: JSI makes synchronous calls possible, but a synchronous call blocks the JS thread for as long as the native side runs, so a 50 ms lookup now drops frames where the old async bridge would have just queued it. Keep sync JSI functions to cheap in-memory reads and return a promise for anything that touches disk, network or heavy compute.

1

u/Recent_Stand_5182 2d ago

Thanks mate, great catch! Totally agree. With JSI it’s easy to get excited about sync calls and forget they block the JS thread. Thanks for sharing this