How can I create a loader page between transitions on same web application using Next JS?
Right now, in dev environment the pages have a normal transition, meaning that the CSS is applied on every page correctly. The problem begins when building the application to production environment, for example, when I click on a button that has a Link component to another page, it appears like the following for 1 or 2 seconds:
After 1 or 2 seconds it renders accordingly:
Sorry for the vague question, but I don't know where to start looking to resolve this problem and I guess it'll fix with two possible solutions:
- A loader page between transitions on pages.
- Doing something on _app.js or _document.js, but right now I don't know how to start looking here.