We’ve been rebuilding our app in React Native, and we also need to build a web version of it. Is React Native Web ready for prime time? Have you tried going from a non-expo React Native app to React Native Web?
Someone once suggested we should do something like native base first.
Forgive my non-techiness I’m not a React developer myself.
I've got a project that is more than likely best suited using a mobile app. But there are also going to be users in an office in front of a computer. The interfaces between the two "versions" can be mostly similar. I don't really know react, but the idea of being able to use react native and react native web for both mobile and desktop sounds too good to pass up. Taking a tutorial on Udemy and I'm already seeing some pain points on the web version. Views default to noscroll, everything in a narrow portrait mode, etc. Looks like there would be a lot of extra logic to get decent views on both web and mobile versions from the same codebase. All tutorials I see specifically focus on react native, nothing specifically for how to have an awesome web and mobile version using react native web. Is there such a thing? Or better to just use regular react for the web browser?
Videos
I see few people talking about the web part.
I would like to know if it's good to use in production and if you have sites that were created using React Native Web.
Years ago I tried to use RN to a mobile/web app, and the experience was not as good as I would have liked. Today I'm in a similar situation, and I would like to know how good React Native is these days.
Note: I'm a web developer and I worked only 2 months in a mobile React Native project
I'm planning a new SaaS project that is going to have a web app as well as a mobile app. I am having trouble deciding if I want to build a separate web app in React, or just keep everything in React Native. I'd also like to reuse a lot of this code for any future projects as sort of a starter template.
I am way more familiar with React than React Native, although I have done some stuff in React Native, but never utilized their web portion. Here are some considerations I'm hoping to get some light shed on:
-
How is the DX with React Native Web? Are there limitations or quirks that you run into that would be much easier to handle in React? If I do run into limitations, is it possible to build some of the website components in React and some in React Native, or is that not a thing?
-
Are there any prebuilt UI component libraries that you would recommend for a React Native only approach? Something that looks good on web and mobile and ideally provides some templates as well like a sign in page, landing page, etc.
-
If I choose the React Native + React route, I've read that people create mono repos and reuse as much code as possible, such as state management and hooks. Can anyone explain how this is set up and maybe provide some GitHub repos that use this method? I assume they just have something like a web dir, native app dir and then a shared dir or something.
-
I want to use a UI library that comes with prebuilt components. I really like Preline UI for example, however, it's only for React, not Native. If I used something like that for React, how difficult would that be to keep a consistent style between the mobile app and web? I assume I would basically need to rewrite all the components myself for React Native if I really want to keep a consistent style.
-
Related to #4, are there any UI libraries that provide UI components for both React and React Native?
Any insight is appreciated, thanks!
Hi,
I'm starting work on an application that needs to be created for three platforms: web, iOS, and Android. I want to use React Native for this, but I'm wondering how to approach the implementation of the web version.
Option 1: I use React Native Web and try to use shared native components.
Option 2: I use the regular version of React and create a web version as a separate project.
In terms of functionality, 70-80% of the features are common to both web and mobile.
My concerns: handling separate layout for web/mobile, will native components work seamlessly on web, media queries/responsiveness, routing and handling code when web/mobile functionalities will grow separetly.
Based on your experience, can you advise me on which option would be better?
I have been using React Native (+ Expo) for a few months now, and have developed and launched my app for both Android and iOS. I'm now needing to add some features that would be best accessed from a web app, so thought it would be as simple as tapping 'w' in Expo and seeing my app appear in the browser. How wrong I was.
I'm faced with a never-ending barrage of javascript console errors, first relating to a StyleSheet.create() not accepting the way I had structured my styles (which the native builds had no problem with), then with a stream of complaints about modules using 'react-native' instead of 'react-native-web'.
Am I missing something, or is this just not as easy as I thought? Does anybody use React Native to make a web version of an iOS/Android app, or do you just build a separate React app for that?
will compile on web but not Android) but it's greatly simplified my workflow. Also beware that while the full demo template (PizzaApp) is flawless but bloated, the minimal one is incomplete and a tad buggy (for example the minimal setup won't out-of-the-box compile dev-mode Android due to package.json issues). So, for the first few days, it's advisable you have the full demo open next to the minimal project to get things running properly. After about three days I had a fully working setup, and haven't looked back since.
Hello!
I am building a project using React Native and I absolutely love it. Now that the mobile application is out of beta, we are going to build the desktop web application which will be used more than the mobile app for many users. This project needs to be "production level" and highly scalable.
I have started to look into react-native-web as a way of implementing the web version, but I am starting to have concerns. It seems as if many normal things you might do on web, aren't possible, or are difficult/overly complex. Even something as simple as setting 'fixed' positioning or using media queries is not easy. Or something far more complex like "drag and drop to upload".
We are using redux (actually redux-toolkit) for our data store so we would still be able to share that across web/mobile. This would still be a huge benefit of using react across both projects.
Also, most of our web components will be different from the mobile versions. I'm sure there will be cases where we want to share components, but far less than 50% of the time because we are designing for each platform independently.
What do you think? Do you have extensive experience with react-native-web? What are its limitations compared with a standard react web app?
- Sam
My 50 cents from leading a cross platform 0.5m active users project:
-
Use RN and React separately as separate projects/packages. The products will diverge over time. So will codebases. Don’t lock yourself in from the start
-
Share utils, api requests and redux where it makes sense. Be deliberate and plan accordingly. Finding the right balance between shared and split will take time, in particular early on in product lifecycle where your product is evolving rapidly
-
Set up web and native in a monorepo with the shared package to avoid versioning issues. Use yarn workspaces and make sure you hoist all dependencies
-
Ensure your tests (and types) for shared code are solid and follow good test and CI practices from the start
react-native-web (RNW) is a set of modules that can be used with react-dom. I’d recommend using it for any website because the modules provided are very performant and thoughtful. For instance, StyleSheet is one of the fastest CSS-in-js options available (benchmarks in the RNW repo). Reusing the code across web and native will also be a huge timesaver for testing and maintainability. Disclaimer: I’ve used RNW many times and have also contributed to the project. Here is an example Next.js + RNW website https://evanbacon.dev/
Hello there,
So I'm trying to build a mobile app which also has a web app version but I'm conflicted on which route to go.
I'm a beginner in react-native so I don't have much experience. My main concern is the layout for mobile and web, since it defers and how well the native browser experience will be like. Should I just go with separate react stacks for each? Next JS for the web and react-native for cross platform mobile dev?
Sorry if this isn't clear enough, feel free to ask me more questions. Thank you for your time!
I want to make a multi platform app, but seeing how text native has it's own UI library, I was wondering if the Web side of development looks good like mobile. Basically, does react native look good on web?
I have created a app in react native and the requirement is that it should also support and work web. Now I am not sure how usable react native is on web. It does work on web but I have some challenges.
For example: In react native we use stack navigation to add routes and tab navigation in web how do I handle it. I would like to have a diffrent design in web with the left panel and dashboard. How can I achieve it ?
Should I use react.js and create a separate app for web? What could be the correct approach.
i built an app last year with react native but didn't use it for the web, just ios and android. for web I used next js and its been a struggle to match what my react native app can do. so now I'm thinking of using react native web for my site instead. I'm thinking it will be a full rewrite for a number of reasons and I'm looking for advice on how to combine web with native and what gotchas may be lurking in the details
some features of my existing app that may be different between native and web are a drawer menu, google maps, and image upload
I'd love to hear from folks with experience in making this decision. I understand react-native-web should be a lot less effort. However, mobile apps and web apps are pretty different beasts. I feel like react-native-web is a nice quick win, but with how different layouts - it'd end up slowing development speed in the long run and creating a pretty nasty repo.
That's just my initial assumption and would love arguments both ways
Any opinions on this would be appreciated. Essentially just trying to make a good future proof decision. We want to build a web app immediately, but later make it available as a native app. Speed is important for us. But also scalability and not redoing things.
The app is not going to be complicated, it will be mainly contacting a backend service linked to an AI, logging them in and allowing users to view and edit AI generated responses on the client.
We don't have any crazy styling requirements but we are interested in what limitations we might have with React Native Web when it comes to styling and functionality.
I know this project has come a long way in recent years and am excited to leverage it if it's the right tool.
Any thoughts?
Other info:
-
We are thinking to use expo (unless there's a reason not to)
-
Our backend is redwood/gql
-
We want the mobile and web experience to pretty much be the same
https://github.com/necolas/react-native-web
I know this can run across Android, IOS and browsers but is it convenient to use it for layout on a large screen like PC? Our team want to save time and develop only one App which is truly cross-platform instead of using both React.js and ReactNative. Thank you!
Ok so react native provides the ability to code for both mobile and web, I was just wondering if anyone uses this quirky feature...
I would run away from this generally, but it is a well intentioned goal to have RN making nice websites. My RN apps are deeply integrated with Native Modules so its not feasible for me anyway. But, I want to check the temperature generally, is this a good use case for RN?
We are building an app with React Native as a cross platform frontend for Web, iOS and Android. We have both real time and "offline first" features for mobile. Have a few questions reg. that:
[1] Will GraphQL be of any benefit for the "offline first" feature? I mean to say, when the mobile device comes online, will GQL be able to sync the server side DB and mobile DB automatically? I heard that GQL can work as a substitute for WebSockets to provide real time updates, that is why I am asking.
[2] We plan to use MQTT for real time alerts from online devices (may not be mobile) and push to a Kafka cluster. Can GQL be leveraged in such a setup?
[3] Is React Native a good choice for this as we want to maintain a single code base, where a subset of features are deployed depending on the platform. For example, features A, B, X, and Y will be deployed on the web version, and A, B, and C will be deployed on mobile devices.
Thanks in advance for your help.
I have to build an android app and a web app with the same features for a client. Do you think I should use react native?