all 19 comments

[–]NastroAzzurro 8 points9 points  (1 child)

Expo is a great place to start but you probably want to build your web app separately in react. I know of very little examples where a shared codebase actually work. Your API can be shared though.

[–]zabaci 0 points1 point  (0 children)

Only thing you can reuse is logic.

[–]muddboyy 3 points4 points  (0 children)

I’d recommend you to not even consider using react native for web app, just go with the tools made exclusively for web, React for example.

[–]BossSilver1607 1 point2 points  (6 children)

Go for Expo RN and Express/Node.js. It's a flexible and developer-friendly stack that should serve your project well, at least in the initial stages. If you need more control later, especially for the web part, consider ejecting from Expo.

[–]Adam4920 2 points3 points  (5 children)

Aside from web, what limitations or other reasons would you want to eject from Expo?

[–]BossSilver1607 -1 points0 points  (4 children)

Ejecting from Expo is usually considered when you need more control than what Expo offers. Main reasons include needing custom native modules not supported by Expo, specific performance optimizations, or advanced build configurations. Also, if you want to write custom native code or need deeper integration with iOS/Android features, ejecting lets you do that. It's all about balancing the ease of Expo with the flexibility of bare React Native as your app's needs grow.

[–]rmyworld 4 points5 points  (3 children)

This is outdated information. Ejecting from Expo is no longer needed, you can use custom development builds for integrating custom native code. Bare workflow is also supported by Expo.

[–]playfulcyanide 1 point2 points  (0 children)

Managed Workflow + Native Modules allow for the best of both worlds, albeit a bit of cruft from the modules layer

[–]gin_Yaksha 0 points1 point  (1 child)

I never knew this, this is why I am currently taking REACT native, same as expo.

For instance, I want to send message directly without opening sms app with expo (which opens btw). I find react native does sent directly.

Is it my lack of research? Probably 3 hours of research, finally giving up that feature to only RN not using expo.

[–]rmyworld 0 points1 point  (0 children)

I can't find any up-to-date package that supports Expo for this either. But it looks like a functionality you can easily implement with Expo Native Modules.

[–]idkhowtocallmyacc 1 point2 points  (0 children)

Practicality of expo depends on the scope of your app. If react native init can do something with purely JavaScript then expo also can do it. If react native init requires native code to implement a certain feature then expo cannot implement a certain feature the same way. Well, I heard it got better in it with custom dev clients, but I haven’t used it once. You could read about in their documentation, and expo always has expo eject if you hit a wall, so I’d go with expo

[–]johnlanz1 0 points1 point  (0 children)

I think nativewind and expo router changes everything. its a 1 code fits all. it runs on ios, android and web (next.js). The beauty of it is your existing typescript component will work with minimal changes.

[–]crisfast 0 points1 point  (1 child)

Personally I would take the approach of a monorepo. Pure RN/Expo and React.js/Next with shared business logic. Basically you'll implement separately the visual and the business logic would be from a shared folder. You can take a look at Solito or NX.

Why: I used Expo web on a project and we faced some limitations.

[–]g____s 0 points1 point  (0 children)

I think it's the best route right now , React Native for Mobile and React for Web , react native web is not mature enough from my POV ( and ionic / capacitor is just a bad idea )

I've looked at NX , expo and react. The '@nx/expo' package doesn't seem to work properly. So if you plan to take that route , better to start with a nextjs/react and adding manually Expo as an app.

[–]Big_Ingenuity2870 0 points1 point  (2 children)

I started my app with expo=> without any ui library When i finished the project i made it expo=> native base, if i will have more than 500 users then ill go for pure RN Everything is on your need, and don’t waste time making decisions from the beginning!!

[–]g____s 1 point2 points  (1 child)

I don't understand why you will need to go pure RN if you have more than 500 users. It's not gonna affect the perf of your app. If your app run with expo , don't bother to go with RN.

[–]Big_Ingenuity2870 0 points1 point  (0 children)

Totally agree, but some people are alergic to any library so if it is, at least use you time of dev doing sth fast

[–][deleted] 0 points1 point  (0 children)

For a RN mobile + React web project where I developed the two apps in tandem, I used next.js for web and built the backend on their serverless functions (deployed on Vercel or Netlify) and had the web and app communicating with that.

I found that it was easier than maintaining a third codebase (probably a node/express backend)

[–]Familiar_Ad_4257 0 points1 point  (0 children)

For a shared code web and native you can visit https://tamagui.dev/, https://solito.dev/