React Native Bridgeless Mode for Dummies

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys so I've been having a lot of questions  about bridess mode not only from people on social   media but actually from clients who are um trying  to update their apps migrate their apps and I   thought I would just make a very short video try  to explain um on a very easy matter what's this   migration about so if you're familiar with  react native over the last few years there   has been quite a lot of changes uh the core has  be migrating to the JSI to C++ to a more native   communication and on those lines uh bridgeless  is the next step in the evolution of react native   where um the core team is finally getting rid of  the old Json Bridge which means everything will   now be native communication through the JSI so um  there's this post which explains on a very high   level what it actually means or not a high  level but more detail what does it mean for   Native modules for the native renderer for fabric  and all this kind of stuff um you can take a more   detailed look if you're interested in there um  but I thought maybe a visual explanation is a   little bit better so um as you know or maybe  you don't know uh react native started with   the brid Json Bridge which basically handled  all the communication between JavaScript and   native right your JavaScript would serialize um  your state of the UI whatever commands or whatever   functions you wanted to call from the Native side  into Json they would get handed over to the bridge   where you can just think as an instance is an  object that handles this communication and then   the bridge would then call the native functions  themselves um so the big idea behind the JSI and   doing these native modules migrations is that that  um this was slow right stringifying everything   um this became a bottleneck where there was a  lot of things going on where UI had to update   where you need to call native modules where you  had a lot of data um so the entire idea is just   to replace to get rid of this right and once you  have that this gets replaced with the JSI now in   order to keep the apps working over the last few  years um actually this wasn't compl completely   removed like the bridge was still there uh and it  was kind of running in parallel with the JSI the   JSI is not a object on its own right it's just  a bunch of heads and functions that allow you   to call native code but basically uh all the old  modules would still work even if you had the new   architecture turned down um this is of course  not maintainable because it requires a lot of   work to keep both of the systems running  and working so basically the idea is then   now to get completely rid of the Json bridge  and just you know you can even think of it more   like on the lines of there's nothing standing  between your JavaScript and the negative code   so this is going to bring let's say improvements  uh Maybe not immediately because nothing changes   immediately um but rather on the long  term U the core team can iterate on more   native functionality synchronous  synchronous apis and this kind of stuff now um if you have an old module you do want to  migrate to bridgeless this has been an ongoing   work um from the community itself because a lot of  packages are you know from different uh players in   the community Expo Melo some me myself you know  whatever whoever has a package that uses the old   apis using the bridge they need to migrate to  bridgeless mode eventually um but for now there   uh the old modules are still going to work with  this thing that's called an interrupt layer which   basically um allows the all declarations that  we had that used the syntax the macros that we   used to declare the old modules to work work with  this new bridgeless mode this will eventually go   away um it will definitely stay for this year  but uh eventually all the modules will need   to be migrated to Turbo modules which um work  on Bridges mode U but for now um your modules   should more or less work maybe you need to do a  little bit of work in there so um it's just as   a head up if you have your app and you depend on  some of these modules which are not migrated then   at some point um either you will need to migrate  them yourself or the author needs to migrate them   or you need to look for an alternative all right  um also would be good to mention a new tool um   which is this new Arch helper package from um  alexio I don't know how you say it but in any   case this allows you to run it inside of your  application and it will tell you which package   are ready to be um used in the bridgeless mode  now this doesn't run anything against the package   itself there is an Excel sheet somewhere where  all the authors all the maintainers of different   libraries we have contributed and um declared  if our library is working or not but uh this   definitely does give you a good sense of which  of the libraries you're depending on are ready   to run on the new architecture and on bridgeless  mode very very useful so yeah basically uh that's   all about bridg list again you can read more  details in the actual post from the team you   can try to turn bridgeless mode on your app see if  anything explodes it will most likely explode if   you have a fairly large app you will be depending  on a lot of old modules um but this is the path   where things are going um I'm very excited  to see what changes this brings in the future   and yeah I'm available for freelance  work not right now exactly but um yeah   get in touch follow me on Twitter  also YouTube and see you next time
Info
Channel: Oscar Franco
Views: 4,304
Rating: undefined out of 5
Keywords:
Id: K5HBIKAjZ4U
Channel Id: undefined
Length: 6min 43sec (403 seconds)
Published: Wed Apr 24 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.