The Checkered Past of Cross-Platform Development
Naturally, creators of software want to reach as many users as possible. This means targeting as many platforms as possible, ideally with minimal investment of time and energy. As a result, technologies designed to target multiple platforms with a single code base have been omnipresent. Technologists of a particular vintage will remember "Write Once, Run Anywhere" (WORA), the slogan created by Sun Microsystems for Java. Unfortunately, this slogan was better in theory than in practice, resulting in the rejoinder "Write Once, Debug Everywhere." The unfortunate reality is that cross-platform software development is tricky. The good news is that the tradeoffs and compromises involved are fairly well-known by now (see Wikipedia). With all this in mind and our skepticism engaged, we are now ready to explore the current landscape of cross-platform applications.
The past decade has seen a number of technologies and techniques designed to facilitate cross-platform mobile/web app development, some more effective than others and each with their own strengths and weaknesses. One technology that looks particularly promising at present is React Native.
Considering React Native
Up to this point, we have two very similar libraries targeting three very different platforms (React for the browser platform, React Native for iOS and Android). Enter the confusingly-named React Native for Web. Shortly after the release of React Native, a developer at Twitter began the work of bridging the native components of React Native over to browser-specific UI elements (extending our previous example of the native Text component, React Native for Web might ultimately render it as an HTML span element). The creation of React Native for Web opened a new possibility: a single code base targeting React Native, resulting in an application deployable to iOS, Android, and the web. Write Once, Render Everywhere. For a great entryway into this world, check out Expo.
Cross-platform application development with React Native is no silver bullet. Recall the healthy skepticism and well-known trade-offs and compromises we discussed previously. Browser apps and mobile apps have some fundamental differences, after all. For example, browser apps are still typically navigated with mouse and keyboard, whereas mobile apps are typically navigated by touch. Furthermore, navigation through a browser app is typically different from that of a mobile app (think URLs and links). That being said, for some applications, using React Native to target both mobile platforms and the browser is a great way to achieve a single code base with minimal platform-specific customizations.