Giter VIP home page Giter VIP logo

Comments (5)

knoebelja avatar knoebelja commented on May 26, 2024 1

Thanks Max! I just served it statically and it loads perfectly and its also much faster!

from nextein.

knoebelja avatar knoebelja commented on May 26, 2024 1

I can make an example for you on Saturday morning when I've got my own personal time to code.

from nextein.

elmasse avatar elmasse commented on May 26, 2024

Hi @knoebelja, thanks for using nextein!

Could you please add more information about this issue? Is this in dev mode or the exported site? Usually if you use a Link **and ** the component is being reused by React then it shouldn't reload the asset. But this issue can be due to many different scenarios.

In case you have a public repo I can check let me know.

Thanks,
Max

from nextein.

knoebelja avatar knoebelja commented on May 26, 2024

Unfortunately, the project is not in a public repo. I am usingLink however. And the project seems to happen when I run nextein and also when it is deployed. When we deploy the project, it is in a docker container using nextein build followed by nextein start.

from nextein.

elmasse avatar elmasse commented on May 26, 2024

nextein is a static site generator. Personally I won't recommend to use it for an app (even though you can because of next) since it is not tested as a production server and it might imply many security problems.

If the project you are working on can be deployed as a static site (using the nextein build && nextein export) you can use serve to deploy the generated site within a Docker container.

Back to your issue, as I said before, there are many scenarios that could make a static asset to be reloaded. Usually, if it's an image, the browser caches the image and there is no impact. Remember that next pages are or can be cached but each page re-renders when you navigate using Link. On the other hand, when using an <a> tag the whole page is reloaded.

Could you create a simple scenario / test (maybe using nextein-starter) to reproduce the problem so I can check what's going on?

Thanks!

from nextein.

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.