News for hackers. Stuff that matters.
Re:No, React Native is not the future by gloosx on Sunday January 01, 2023 @04:36AM (#34204979)
Because two things, UI is different between platforms, to make a quality native-feeling app, you will have to use the design guidelines and native elements of every platform. What you can share is the business logic, abstract ui logic, but not the views themselves. You absolutely don't need to merge codebases in order to share something between them, you just need to have it portable. Having one mega-app seems more of a complication to me.
Re:No, React Native is not the future by davedx on Sunday January 01, 2023 @05:38AM (#34205275)
Think people are talking about different things. When I think about sharing the same code base I think about a single repo with lerna packages, where a lot of the common code is in packages, and each platform's native app is also its own package with its own build toolchain, that pulls in the shared code packages.
Re:No, React Native is not the future by gloosx on Sunday January 01, 2023 @06:36AM (#34205534)
You're proposing a perfectly fine setup, what people are trying to do is just a single web app for every platform, they achieve this by releasing their own web browser app which opens just their page
Re:No, React Native is not the future by supermatt on Sunday January 01, 2023 @06:50AM (#34205595)
> you will have to use the design guidelines and native elements of every platform

This is exactly what react native does. It uses native components (there is a cross-platform abstraction, or you can use the platform-specific components directly) and you implement the design guidelines in platform specific files: https://reactnative.dev/docs/platform-specific-code

> but not the views themselves

Without the views, why would it be in react native? React is for building the UI...

> Having one mega-app seems more of a complication to me.

single codebase != mega-app. There is no "mega-app" as the compiler only uses the code for the target platform. You can even target specific architectures and/or devices as it uses the native sdks behind the scenes.

Re:No, React Native is not the future by gloosx on Monday January 02, 2023 @05:15AM (#34216290)
I think we're battling on the same side, I was generally speaking about subject of the OP post, where people make one web mega-app for all platforms with the same views, achieving this kind of single-codebase ;)
Re:No, React Native is not the future by supermatt on Monday January 02, 2023 @08:29AM (#34217608)
Oh! im with you. You mean that the views should be taiulored for each platform, not the same UX everywhere. Yeah, totally agree with that!