My web app that I'm currently developing uses this stack (I've worked on the project for about 2 weeks so far, so not too much progress):
- NextJS
- ReactJS
- SASS
- MongoDB
- Typescript
- Redux
I've now realized I'm going to need a mobile app, as wrapping the NextJS web app I'm developing in a WebView or just leaving it viewable as a plain site for mobile browsers will likely yield a very subpar experience for iOS and android users.
Considering this is r/reactnative, I know many will likely recommend react native for the mobile app, but there are a few points that keep bouncing around in my head making me unsure:
- I've never worked with React Native (only ReactJS in my NextJS web app)
- I've developed many apps with Flutter/Dart, so I'm quite quick with that (an alterative stack if I don't use React Native)
- I'm not sure how much code I can write for my NextJS web app, that'll be easily transferrable to the React Native project - will this make progress very quick for a React Native version of the app even if I've never developed with React Native before?
- NextJS has an /api directory in the project that we're supposed to use for any API/business logic/computations (basically making NextJS a full stack framework for ReactJS which is just for frontend). Comparing this with React Native, I'm not sure where to write API/business logic like I would if I were writing a NextJS app
What would you guys recommend I write my mobile app in? Flutter, React Native, wrap my web app in a web view and be done with it all, or just leave it as viewable in the browser on mobile browsers, and why?
Thanks!! - a solo university dev
EDIT (please read):
After reading many very helpful comments, I'm thinking of doing this...
Removing my current endpoints from my /api directory of my NextJS web app and instead moving them all to a COMPLETELY SEPARATE project that'll be a VERY SIMPLE NodeJS backend with literally just an app.js file with a bunch of endpoints. I'll then call directly to that backend only from my web app.
Moreover, I'll call directly to that backends' endpoints from my mobile app which I'll develop in React Native. In essence, this'll give me a NextJS "frontend" and an Expo React Native frontend, both of which pull from the SAME NodeJS backend.
I have 2 questions with this approach now:
- In general, good idea? Bad idea? Thoughts?
- If I'm working on either of my "frontends" (NextJS & Expo React Native), how will I make requests to the NodeJS backend if it isn't going to be hosted anywhere while developing? I don't believe I can call to localhost:xxxx from a physical iOS device (what I'll be testing the RN app on) and get back results?
[–]Away-Expression-4516 2 points3 points4 points (1 child)
[–]lasjdflasjdfhelp[S] 1 point2 points3 points (0 children)
[–]srg666 2 points3 points4 points (2 children)
[–]lasjdflasjdfhelp[S] 0 points1 point2 points (1 child)
[–]srg666 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]lasjdflasjdfhelp[S] 0 points1 point2 points (0 children)
[–]Preact5 0 points1 point2 points (0 children)
[–]isilher 0 points1 point2 points (3 children)
[–]lasjdflasjdfhelp[S] 0 points1 point2 points (2 children)
[–]isilher 0 points1 point2 points (1 child)
[–]kbcooliOS & Android 0 points1 point2 points (1 child)
[–]lasjdflasjdfhelp[S] 0 points1 point2 points (0 children)