Dear @Revant,
I saw the RFC for standardizing on Flutter for the mobile solution of FrameworkM. I would like to propose a different approach.
I liked the fact that FrameworkM is using React on the frontend, but I think it should go one step further and use React Native exclusively.
As you know, React Native also works on the web, using react-native-web. There is now also an alternative, more streamlined react-native-web implementation in Tamagui (https://tamagui.dev).
The advantages of using React Native for both mobile and web are the following:
* Use a single codebase for most of the logic and UI code on all platforms.
- Easier to avoid hacks like throwing in divs with inline styles instead of using proper RN components.
- The mobile apps are actually using native components on their platform (I think in the RFC the note about React Native not using platform-native components is wrong; it is actually Flutter, which is using a custom reimplementation of UI components.)
- TypeScript is probably the best-supported language by LLMs.
- RN is very actively developed by multiple companies, and the legacy architecture is finally removed (in 0.82+).
I also think that Tamagui is currently the best React Native frontend framework, which has really great developer UX for both mobile and the web. They are even working on a Vite plugin (in their https://onestack.dev project), which will be able to replace Metro, so Vite can be used both on mobile and the web.
If FrameworkM would go with Flutter for mobile, it would lead to the same issues as with Frappe: both the UI and the logic would have to be reimplemented for mobile.
I am not saying, that RN is perfect, and there are definitely some challenges to overcome, for example:
- There are components, that only support React, and not React Native, e.g. workflow editor or WYSIWYG editor components. In most cases one only wants to use these on the desktop, so these components can be included only on the desktop builds.
- There are some components that are only supported on mobile, and not on the web. Most of these are not relevant for the web, and in most cases there are suitable alternatives. Using Tamagui and similar UI frameworks where the Web is also regarded as a first-class target usually solves this issue.
These challenges in my experience, can be handled with carefully chosen dependencies.
A little bit about my background:
- I am the co-founder / CTO of Migeran (https://migeran.com)
- We have been designing and developing cross-platform mobile and web solutions for 15+ years
- Our Java-based iOS development solution was bought by Intel in 2015 (and later released to open-source, it is now a community project): https://multi-os-engine.org
- Worked on RN projects for 6+ years, including a new RN platform.
- Developed React Native Godot for a client of ours (https://github.com/borndotcom/react-native-godot)
- Developed the V8 JS Engine for 6 years, with some smaller work in JSC and the early DartVM (used by Flutter) as well.
Based on this experience, I think that going all-in on a React Native frontend for FrameworkM apps would be the best route.
What do you think?
Kind regards,
Gergely