Giter Club home page Giter Club logo

Comments (1)

mlynch avatar mlynch commented on May 18, 2024

Hi @SunPj, you have two options when building a mobile app with Next.js: static export or classic remote-loaded.

Static export means you have to sacrifice any features that require a server because you have no server environment when running locally in the native app environment. While this seems extremely limiting it's really not, you will just build more of a classic SPA and use client-side routing (such as Ionic's router if you are using Ionic, or another framework's routing solution, or roll your own).

The other option loads your Next.js app remotely. You can use all Next.js features because it's just like any other Next.js deployment. This sounds great, right? Well there are significant trade-offs to think about with this approach. The first is that your app might not pass app store review if it doesn't feel like an app but rather just a wrapper around a website. This has nothing to do with it being web-based but Apple does not want apps that just wrap remote websites and add no other native features. The way to do this right is to have a mix of offline/local experience and the remote app to make the app feel great and fast on launch and not be obviously just loading a remote website. This can be partly done by configuring the server.url config value in Capacitor: https://capacitorjs.com/docs/config

from nextjs-tailwind-ionic-capacitor-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.