Would it be possible to use React Native and Xamarin in one app.
You can look at this in two ways.
- Embed react-native in a Xamarin app. This would mean creating a binding to
RCTRootView
in such a way that Xamarin can initialize it and load the js bundle. Does this mean that all other react types need to be bound as well? Or wouldRCTRootView
be sufficient? - If you look at it the other way: would it be possible to write native view (be it Android Views or iOS UIViews) using Xamarin and make react-native use them? This will probably also involve some sort of binding as well because this needs an
RCTViewManager
on iOS orViewManager
on Android.
Why would you want to do this? Maybe because you want to extend an existing Xamarin app with a new section in react native. Maybe because you like writing customer views better in C# than in Swift or Java. Or maybe just because you want to convolute things ;-)
So are there technical issues which would make this impossible (like macro's)? Or is this technically possible but just very cumbersome to get going? Or can this be done?
2 Answers
Answers 1
How to integrate a React Native View into any existing iOS or Android application is well documented, so this should definitely be possible.
You may want to also take a look at Wix's react-native-navigation as they have broken out of the standard "unique view" from React Native.
Also, someone made it possible to use Cordova plugins in a React Native application, as an example on how to do it the other way around.
Answers 2
Check this out. It has all the documentation if you want to use reactive extensions. If you are creating a brand new project, then you can use ReactiveUI, which is a mvvm framework with reactive extensions. Its documentation are here.
0 comments:
Post a Comment