|
|
|
|
|
by hunterb123
1749 days ago
|
|
With React Native you can just use file.ios.js or file.windows.js etc if you want to do something different entirely for a platform. You can also check the platform with a function for minor adjustments. You can also handle these differences in a RN extension if they involve native code. You can model your codebase so the function stubs are the same, but the implementation differs based on platform. So you can use it the same way in the rest of your code. I run this setup in production and I share about 95% of code between platforms for a complex cloud storage app (file manager, uploading, etc.) Basically isolate what's different, and abstract it to a common interface. |
|
Well if you need a specific widget or library that react native doesn't support by default you have to write bindings, and unless your business logic is very basic it happens most of the time. You might be lucky somebody already did write some bindings for you. As someone that used Titanium in the past, React Native suffers from the exact same problems.