Can we configure both SSG and SSR individually for every page on the website?

Is there a way to individually configure SSG and SSR for each page, rather than applying it across the entire project?

Answer №1

Unlike some other frameworks, Nuxt does not offer support for hybrid SSG or SSR modes. This means that these options are defined globally rather than on a per-component basis.
Overall, performance should be comparable whether you choose SSG or SSR, and you can likely generate most of your content with SSG.

There may be more rendering modes announced during upcoming events like NuxtNation, so consider participating to stay informed.

In the meantime, Next.js provides flexibility in allowing certain routes to still be requested from the server through its feature called getServerSideProps (Server-side Rendering). For additional information, check out this Twitter thread.

It's important to note that Nuxt does not currently have a similar capability.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Developing a RESTful API using NodeJS that interacts with Python to handle JSON data and trigger

I've recently started working on a new project and I'm in need of some assistance from experienced individuals. The foundation of my project is based on this tutorial: https://scotch.io/tutorials/build-a-restful-api-using-node-and-express-4, whi ...

Step-by-step guide to creating a perforated container:

I'm putting together a step-by-step guide on how to navigate through my app for the first time. Imagine a pop-up that explains how to use a specific button During the tutorial, I envision a darkened background with a highlighted circle around the bu ...

Adding a navigation bar to every administrator page while excluding it from shop pages can be achieved by creating a

I am facing a challenge in implementing a navbar and sidebar on all admin pages, except for the shop page. The issue arises because I have set my sidebar and navbar to be global. My goal is to make them global only for admin pages and not for the shop. He ...

Retrieve the value of a variable by using either an HTTP GET or POST request

Here's the HTML code snippet that I'm working with: <head> <h1>Sample Page</h1> </head> <body> <form method="POST" action=""> Enter Keyword <input type="text" name="key"> ...

Saved links and navigating within an iFrame originating from a separate secure domain

Is it possible to execute a bookmarklet and enable navigation on an iFrame sourced from a different secure domain? For instance, suppose I have a webpage loaded from https://example.com, containing an iFrame with its source set to . Whenever I run the boo ...

Blank datepicker displays as NaN when no selection is made

I've customized the bootstrap datepicker in a form by adding input fields, and everything is functioning correctly. However, the issue arises when the default date is displayed and if no date is selected, the month field shows 'NaN'. Is th ...

What could be causing my button to pass the event to its parent element?

I've implemented a clever trick within a div, where I have included my own custom "data" indicating what action to take when the user clicks on it. My JavaScript code snippet is as follows (with some code omitted for clarity): $('[data-hqf-swit ...

Can you explain how I can configure the express module for routing?

directories /config -routes.js /public /views -index.pug /home -home.pug -app.js app.js const express = require('express'), app = express(); app.use(express.static(path.join(__dirname, 'public'))); app.se ...

Leveraging NextJS to retrieve a complex array of objects from MongoDB through the use of mongoose and getServerSide

My goal is to retrieve an array of objects from MongoDB, utilizing mongoose and SSP. The only challenge I am facing is that all ObjectIds need to be converted into strings. Currently, I am handling it in the following manner: export async function getSe ...

Using the prompt command in HTML is not supported

I am having trouble with incorporating the javascript prompt command into my HTML website. I need some assistance in identifying where I went wrong: <head> <script type="javascript"> var pass=prompt("What is the password") ...

What is the best way to change the sorting of an array in state when it is clicked on

Developed several functions to sort movies by rating, stock, and title upon clicking. One thing I'm attempting to achieve is the ability to toggle between sorting movie titles in ASC order on one click and DESC on the second click. To accomplish this, ...

Angular 5 Service Unit Testing for UPDATE Function

Currently, I am implementing a stepper feature with back, step, next steps. On the last step, when the user clicks 'done,' I need to call a service to update user data. While I have successfully tested the backStep() and nextStep() methods, I now ...

How can you disable the Vue development mode warning by setting Vue.productionTip = false in your code?

I have very limited experience with JavaScript, and all I'm trying to do is insert a line of code to turn off a message. However, no matter where I place the code, the message continues to display. Here is my code: var getCalculatorApp = (function () ...

Incorporating JSON data into an HTML table using AJAX (when response is not iterable)

I am facing an issue with storing data from a JSON object into an HTML table. Although I can see the data in my console when I log it in my Impl class, I am unable to display it in the table. Here is my JSON Object: { "vehicleRegID":"V001", ...

Is there a way in JavaScript to convert a web page into a string?

I'm looking for a way to retrieve the HTML content of a webpage using JavaScript, even if it's on a different domain. Similar to what wget does but in JavaScript. I intend to use this for web crawling purposes. Could anyone guide me on how to fe ...

The MODULE is malfunctioning due to an unidentified mutation type: user/setUserInfo

My store/index.js looks like this: const store = new Vuex.Store({ modules: { app, user, }, state: { token: getToken(), hasLogin: false, }, mutations: { ...rootMutations, }, actions: { ...rootActions, }, }) export de ...

Exploring the Practical Applications of Mutation Types within Vuex

After delving into Vue (2.x) + Vuex for some time, I've noticed a common pattern emerging - the use of Mutation Types. Personally, I find this practice to be unnecessary and only adds complexity to projects with additional files. Perhaps my lack of e ...

Exporting methods/functions in React Native

import { width as responsiveHeight } from "react-native-responsive-dimensions"; I am trying to export responsiveHeight with the name width. Can someone please guide me on the correct way to do this? The current approach is not yielding any results. ...

Preventing the Vue watch event from triggering before the change takes place

I'm trying to figure out if there is a way to handle the watch event before the actual change takes place. I've searched online but can't seem to find any information on it, and I find it hard to believe that this feature is missing. TL;DR: ...

Can someone show me how to implement arrow functions within React components?

I am facing an issue while working on a node and react project. Whenever I use an arrow function, it shows an error stating that the function is not defined. Despite trying various tutorials and guides, I am unable to resolve this issue. Below is the snipp ...