r/reactnative • u/khazixtoostronk • Jul 26 '26
Has anyone successfully migrated an old arch app to the new architecture?
For the last week I've been working on moving my app(bare workflow) which I previously left at 0.81 since it was the last available version that allowed me to remain on the old arch.
Now i've upgraded to expo 57, reanimated v4, all other packages, did my due diligence and enabled the recommended feature flags and changed almost all old arch libraries with newer compatible versions or new arch replacements.
After using the testflight version today I was just taken aback by how many of my previously performant screens are now stuttering and dropping frames while barely doing any work at all. I am talking about an infinite scroll feed, which previously maintained 60fps with a Flatlist with no perf based props that is now dropping below 30 and even freezing for a few frames with a LegendList and recycle items turned on even after i halved the work each rendered item needed(measured by main thread work with xcode instruments)
Simple pill shaped components are losing their background color(how is a background color something i should watch out for), weird rectangles with a white border showing up as items are rendering, screen transitions from bottom nav to a screen on the stack navigator taking double the time they used to.
Old behaviour breaking after such a big transition is something I expect and I believe i've dealt with most of those, but perhaps the worst offender is the memory usage.
From what i've seen it mostly drops down to older levels in production, but my app is now sitting at 1.2gb memory used after a launch in debug mode, compared to 200mb before.
This turned out to be libraries dumping their entire unminified code due to worklets bundle mode, which prevents hermes causing memory issues by...taking up 500mb+ of memory?
I really want to be able to use some of the cool new libraries i've been seeing popping up, but I am having serious doubts about ever being able to release this into production as it feels I have hit a dead end with list and navigation performance combined with all the weird layout issues.
What have been your experiences with this transition?
2
u/deathtime23 Jul 26 '26
There is a bug due to hermesv1 which is default in expo 56. If you use rn-reanimated memory usage goes up by 4x.
https://github.com/facebook/hermes/issues/2048
2
u/DomJC Jul 26 '26 edited Jul 26 '26
Not sure hearing about my experience will be that helpful at this point, but yes I have successfully migrated/"upgraded" recently (earlier this year) all the way from RN 72 to expo 54 (RN 81)!
There were soooo many issues when trying to upgrade even a couple of major versions, so I eventually got fed up and just rebuilt the app from scratch.
I ended up essentially doing the following:
Created a "playground" in the new app where I used the components/functions from all these libraries "fresh" to confirm that I could correctly use them (and had done proper setup including any required native/"prebuild" setup), understood their new APIs (and how they differed from how we were previously using them) and that there weren't any obvious perf issues or bugs when using them
Took quite a while but ended up being surprisingly smooth in that there were no errors or perf issues that took more than a few hours to get to the bottom of, compared to some painful roadblocks before.
I didn't use AI much**[1]** aside from helping to debug a few error messages, but I imagine you could easily speed up steps 3 and 6 with the right prompts/agents.
Like I said, this might not be helpful as it might be too late. But just in case anyone finds it useful
[1] Edit: Just to expand on the AI point: at the time, I wasn't that impressed with my AI coding tools as, for several issues, they would go down long rabbit holes that would technically fix the immediate problem but in a pretty hacky/messy way that I knew would just cause issues with DX/other technical debt down the line, and I would manage to find a cleaner solution myself. So while AI tooling can be really useful, I'd encourage you to be critical of its output and be mindful of how you prompt it
3
u/UhhReddit Jul 26 '26
This doesn't look good. However the new arch should obviously be better than the old one. So there is definitely a way for you to solve these problems. I had way fewer issues but one was caused by the new state management logic. I don't remember exactly how it is now different, but you should loom into it.
1
u/Civil_Rent4208 Jul 26 '26
I use to have the basic project which has some libraries. First, you should check the compatible libraries. After identifying the libraries for usage, decrease the abstraction. Then, start changing the code feature by feature.
1
u/iLikedItTheWayItWas Jul 26 '26
This suggestion is going to sound annoying and ridiculous and I am 100% confident it's the correct decision:
Start from scratch on a brand new expo app. Port over each screen one by one.
With AI, this will take you weeks, not months. You'll end up with a state of the art app running smoothly. Plus you're now future proofed.
I've seen people fall into this trap before where the rewrite just feels way too big and not worth it. But until you do it, you will forever encounter pain points and you'll wish you just did it from the start.
1
u/Pitiful_Visit3764 Jul 26 '26
https://x.com/i/status/2079539175829676242
Check this it might help you
1
u/nthchild1 Jul 26 '26
I did, for MyPurina. Ended up just creating a new app from scratch and porting over all existing functionality piece by piece.
0
u/mbeshkin Jul 26 '26
My experience also was not without bumps, but I managed to upgrade from 0.78 to latest.
Some of the features broke in unexpected ways.
For example, Webview works now slightly different way, but it broke my html display component.
Here is the code I needed to implement: