Reputation: 119
I have started developing an application for all the three platforms (web, ios and android) with single code base.
I came across these two libraries and I want to know which one is better and why?
Also, I came across a lot of open source react-native projects, For example React Navigation, Lottie.
Can I integrate react-navigation (or any popular react-native module) in my react-native-web or reactXP application?
Please provide your inputs and TIA.
Upvotes: 3
Views: 1169
Reputation: 4933
We use RXP as much as possible, and then create a different set of components for the web vs mobile.
For example on the web, you most likely want an <a>
tag with a href
prop to support opening links in new tabs. And on mobile you obviously don't. In this case we have implemented the <Link>
component for each platform.
Same goes for navigation, modals, selects, etc.., and other platform specific things like localstorage implementation.
Upvotes: 1
Reputation: 77482
react-native is a framework for building iOS and Android applications using React. You can read more about the React Native bridge concept here
ReactXP - is a set of components/API which built on top of React Native, React, React Native Windows to simplify building cross-platform applications for multiple platforms (iOs, Android, UWP, Web) with one API for all of them. It is like jQuery which tries to solve the problem with cross-browser compatibility issues. The similar we can say about ReactXP - it tries to provide API/Components which works on several platforms.
Can I integrate react-navigation (or any popular react-native module) in my react-native-web or reactXP application?
ReactXP: It is possible, however, it is not recommended. Usually, react-native plugins support only iOS
and Android
(there are exceptions and some of them support Windows
), so, you need to care about implementation for other platforms. ReactXP has several extensions, including navigation.
Upvotes: 1