Towards the end of my talk about the new #reactnative arch and how to migrate to it, I share this (fairly massive) graph πΌπ
I made this flowchart in an attempt to help teams in the early days of defining their migration plan; let me walk you through some of the main points π§΅
Step 0: this graphs assumes that you are on latest of RN (w/e is available at the time of you using it)
(personally, it looks like 0.70 is shaping up to be the better "base version" to attempt this climb)
Then, it makes you focus on libraries first: there's no way around it...
...we all need to collaborate and migrate the libraries we use. Send PRs!
I put using react-native-test-app because that madlad of @lord_sherlock has basically introduced in it Fabric & TM switches already: so you can easily test in isolation the library, in a painless way.
In the same vein, that's why I then suggest that if you have custom native code lying around in your app, you migrate it into its own lib and then apply the same approach as per the libs (migrating & use RNTA)
Going for "dividi-et-impera" is the less painful approach IMHO.
Next step is to start working to enable TurboModules in app. Thankfully, enabling TM and Fabric are two separate and indipendent processes, so you focus on just one without forcing yourself to also do the other.
The reason why TM first is simple: backward compability.
Basically, you can turn on TM, and libraries that have not migrated yet will still work. (this is something that will get switched off at a later stage, which is why we still need to migrate as many libs as possible!)
And once that's done, you can then focus on Fabric.
Fabric doesn't have backward compability and when you turn it on, it brings along all the magic mystical stuff from React 18 βοΈ - so basically this step is a big jump and you need all the libs to support it for your app to work correctly.
And that's it!
Once the talk is uploaded somewhere I'll share it so that you can hear in more details my reasonings around it - but I hope that this thread was a decent enough overview of my thinking.
What do you think? How would you change this?
For further context, I've discussed this internally at MSFT and with Meta engineers, so it's something that went through some reviews already :)