Next.js Discord

Discord Forum

Mobile app with next js?

Answered
Japanese littleneck posted this in #help-forum
Open in Discord
Japanese littleneckOP
Anyone tried building a mobile app with next js? Is the dx better than using react native? Can it be used for production apps? Can I easily deploy to the app store? Can I use web component libraries like Next UI?
Answered by Matt
We built the UI for https://apps.apple.com/us/app/all-out-multiplayer-fun/id6462538718 in NextJS.

Used webkit webviews on iOS and the Android equivalent and wrapped out NextJS site
View full answer

18 Replies

Xoloitzcuintli
I've been wondering the same thing. Is it a good choice to build a Android app, IOS app and web app backend with nextjs.
I was thinking to use Nest for backend and in Next i would use server actions to fetch api endpoints from nest. Thus Next would be used just as proxy server in my case.
We built the UI for https://apps.apple.com/us/app/all-out-multiplayer-fun/id6462538718 in NextJS.

Used webkit webviews on iOS and the Android equivalent and wrapped out NextJS site
Answer
Works pretty well and feels native with some effort
This is how it looks and feels. About 80% code reuse to our desktop version
It’s all the same components but the page level layout is different
Video looks choppy but the wheel runs at 60FPS consistently
We also have haptic feedback support. We use the postMessage JS API to make calls to Swift/Obj-C
@Matt Click to see attachment
Dutch Smoushond
my question is how do you make next work on android? did you use native? or something else
We use whatever the WKWebView equivalent is and wrap the web app the same way, no react native etc...
@Matt We use whatever the WKWebView equivalent is and wrap the web app the same way, no react native etc...
Dutch Smoushond
i see, will try something like this soon
Xoloitzcuintli
Bro, this looks awesome! Congrats!
Didn't know this is even possible, to build mobile apps with Next.js.
Xoloitzcuintli
But still, i think that in some larger apps that have complex backend logic it might be better to use some mature backend framework because of scalability. What do you think guys?
@Xoloitzcuintli But still, i think that in some larger apps that have complex backend logic it might be better to use some mature backend framework because of scalability. What do you think guys?
Yeah this is a separate backend. We have our API services still in Node, but with Fastify as the framework and self hosted. We fetch these endpoints in RSC and call to them in server actions