Sharing code
Flutter
With Flutter 2 (announced in March 2021), we can use the same codebase to ship native apps to five operating systems: iOS, Android, Windows, macOS, and Linux; as well as web experiences targeting browsers such as Firefox, Chrome, Safari, or Edge.
Flutter can even be embedded in cars, TVs, and smart home appliances. (source).
Perhaps the single largest announcement in Flutter 2 is production-quality support for the web. It can be used for:
⢠Progressive Web Apps (PWAs)Ā that combine the webās reach with the capabilities of a desktop app,
⢠Single Page Apps (SPAs) that load once and transmit data to and from internet services.
⢠Existing mobile appsĀ ā allowing Flutter apps to be run on a desktop.
Find out more here.
React Native
iOSĀ andĀ AndroidĀ ā but there are select libraries that allow you to use the same code to buildĀ iOS, Android, web, and Windows10 apps.
You can also extract shared code in mobile, desktop, andĀ web apps, to a separate repository; treat it as a separate project; then inject it in the same way as another dependency.
This allows a developer to focus on writing code for a specific platform without having to consider compatibility with another one.