ReactXP is a layer that sits on top of React Native and React, whereas React Native for Web is a parallel implementation of React Native - a sibling to React Native for iOS and Android. The goals behind these two efforts are similar, but the approaches differ. We started implementing ReactXP before React Native for Web was available. React Native for Web is an open-sourced library developed by engineers at Twitter. How does ReactXP differ from React Native for Web? Two popular options addressing code share across web, iOS, Android & Windows areīelow is an excellent excerpt from highlighting the difference. We needed to implement the repo for the exact same need of reducing development time between mobile and web applications. (*) Disclimer: I am the implementer of the repo. It implements a sample authentication process which itself can also be used as a baseline for new projects. On the other hand navigation and presentation layer differs. It shares the "business logic" between web and native versions via a folder named common-logic by keeping exact copies of *.js files. For this purpose this github repo named react-spa-jwt-authentication-boilerplate (*) can be used as an example. The question asks for a tool that can speed up the development process. On the other hand, because of the nature of the hardwares, it is completely normal to have different presentation layers for web (mostly on your desktop/laptop browsers) and mobile (native). As stated very correctly in other posts, both react and react-native being JavaScript based, with an architectural design approach you can share your business logic. Īs of today the philosophy still remains as learn once write everywhere. It is very relevant for anyone thinking about using React Native. They wrote an insightful article about their experience and reasoning. Update: In 2018 Airbnb decided to sunset React Native in their production apps. It might still be more efficient than developing two separate Java and Obj-C/Swift apps, though. You can definitely use your designs and architecture, but you would need to rewrite most of the code. The Facebook's philosophy with React Native, instead of write once, run anywhere is rather learn once, write anywhere. While React Native enables you a significant code reuse between iOS and Android (we are currently building an app for client which - appart from external libraries - reuses over 99% code between iOS and Android), it is not designed to share code with React webapps. I'll let you decide for yourself whether it's production-ready in your opinion. Instagram, Tesla, AirBnB, Discord, Bloomberg all have production apps written in React Native.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |