-
Notifications
You must be signed in to change notification settings - Fork 27.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Single Page Application #4088
Comments
Yes, it's possible to build a SPA with next.js, you need to use About Semantic UI, you can use this example: Semantic UI without CDN Hope it helps ;) |
For the layout that doesn't reload see #88 (will come soon). If by SPA you mean running next without a node server, that's currently only possible using
|
No I just meant a Single Page Application which runs server side, with the basic layout (like the navigation) not reloading, only the content. I previously was using Vue before switching to React and was building SPA on that. Basically, you would build a layout was inside of app.js and then any of the content would load inside of that in the content area. Mostly I just like it for the navigation bar so that it doesn't have to reload every time you switch pages. It just looks more fluid. This, I think, required Vue-Router. Thanks for the replies guys. Looking forward to getting to know more about Next.js |
|
Yes, I'm checking that out just wanted to clarify that I did not want to run a static html page without a server. |
So to clarify: this will not be available until Next 6.x? |
Indeed 🔜 |
@timneutkens I am working with Next 6.0.2 and it still reloads the layout. I want to user redux to fetch the menu however the layout is being re-rendered every time and getInitialProps of _app.js is also being called on every request. Shouldn't getInitialProps of _app.js be called once? (And also the re-rendering of the layout is an issue, isn't it?) |
I have the same problem, _app.jsx |
Is there any update with this issue? I am using v7, but it seems that layouts rerendering still exists. Any solution? |
I haven't tried it yet, but seems that custom app override solves the problem. |
what does the custom app override mean ? |
I'm relatively new to using next.js [and React] and I had a question I thought would be best asked here. Is it possible to build a single page application with next.js? I can't seem to figure out how to have a static navbar/menu that won't reload when routing. Do I need to implement custom routing to make this possible? Are there any examples of someone who has already done this? I tried next-layouts and I really don't think it did anything I could not have done without it. Maybe I didn't use it right, though.
Thanks. Also, I have read the examples and previous issues regarding Semantic-UI and was wondering if anyone has figured out how to locally load it without using a stylesheet CDN. Even with the loaders setup properly and no errors showing, it clearly does not load and my page just looks pretty vanilla. :P
The text was updated successfully, but these errors were encountered: