Capacitor with React & Next.js? #3487
Replies: 7 comments 9 replies
-
I also did a little POC iOS app where I loaded the same static next files into the project and then served them in the Web View. I didn't have the UI issue. So it's something about how Capacitor is trying to bring them in |
Beta Was this translation helpful? Give feedback.
-
Yep! People are starting to use the two projects together. Here are some interesting blog posts about this: https://ironeko.com/posts/getting-started-with-capacitor-using-next-js-on-ios Also expect some examples and info from us on how to use it in the coming months! |
Beta Was this translation helpful? Give feedback.
-
There was a next router issue that got fixed recently, make sure you are using latest version. It prevented apps from navigating when loaded from a custom protocol, so looks similar to your problem. |
Beta Was this translation helpful? Give feedback.
-
Hello people, anyone has some more data on this? |
Beta Was this translation helpful? Give feedback.
-
Yes! Works well. See my work in progress here: https://twitter.com/maxlynch/status/1348369544344195080?s=20 Stay tuned for a blog with more info! |
Beta Was this translation helpful? Give feedback.
-
Here's the blog by @mlynch in case people get here: https://capacitorjs.com/blog/mobile-apps-with-tailwind-css-nextjs-ionic-and-capacitor |
Beta Was this translation helpful? Give feedback.
-
Hey guys, I am trying to do something similar to this but would like to point the webview to our hosted app. Apparently, this used to be possible with Cordova and should be with capacitor, I am not 100% sure where to start but was wondering if anyone had some experience with it? What would you suggest for a team that cannot move from SSR (at least right now) but would like to make use of Capacitor? |
Beta Was this translation helpful? Give feedback.
-
Has anyone tried using Capacitor with a React & Next.js app? I created a static version of my app from Next and used that for cap to pull into Xcode. The first page of my app loads fine but when I click to go to the second page, it doesn't actually advance. I looked at the Safari debugger and I can see that it correctly fires off API calls and gets results but the UI doesn't change past my loader. There are also no errors in the Safari console or Xcode. Also if run the static version of my app on localhost and open it in the Simulator's Safari browser, the app does work.
So I imagine it's some quirk about how Capacitor is pulling my Next app into Xcode but since I'm not getting any sort of error, I'm not sure where to look. Any ideas from anyone who might have tried this?
Beta Was this translation helpful? Give feedback.
All reactions