Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does every RCTRootView have its own javascript context?

Tags:

react-native

If we create multiple RCTRootViews in a single react native application and have them load different javascript bundles, are they going to be run in completely isolated contexts? Completely sandboxed and no conflicts at all?

like image 348
Kun Chen Avatar asked Feb 26 '26 18:02

Kun Chen


1 Answers

If the bundles are using separate bridges, then you are effectively creating multiple react native applications running at once. Therefore, they will indeed be 'sandboxed' with no conflicts.

However, it is also possible to load different bundles using the same bridge, in which case the different bundles are used in one single react native application and they can communicate with each other.

like image 123
patngo Avatar answered Mar 01 '26 11:03

patngo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!