iOS and Android native code reuse? #24
-
Thanks to your step by step guide, I’m slowly getting my head around the changes needed to port a native component to the new architecture on iOS. It looks like I can’t reuse any of my existing Objective-C View code. I have to copy it over into the new ComponentView.mm class. Is that right? Is it the same story on Android or can I expect to reuse my existing Managers and Views? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @grahammendick! We are about to migrate to the community the repo you linked, which we updated with the Android side of things just today. So, to answer your question, you still have to create different files, but with a bit of engineering, you can keep using your Android code for both the Old and the New Architecture. Let me know if I can help you with anything else! |
Beta Was this translation helpful? Give feedback.
Hi @grahammendick!
We are about to migrate to the community the repo you linked, which we updated with the Android side of things just today.
As you will see, for Android the proposed approach is to have two different sourceset which instanciate and use a common implementation.
So, to answer your question, you still have to create different files, but with a bit of engineering, you can keep using your Android code for both the Old and the New Architecture.
Let me know if I can help you with anything else!