Questions tagged [server-side-rendering]

Serverside rendering is a technique for rendering a client-side app on the server.

Rendering a client application on the server results in a faster experience for end users since they do not have to wait for assets to load before they can see and interact with an app. This is accomplished by using isomorphic code: code which is used on both the server and the client.

4406 questions
9
votes
1 answer

Selective static html export of pages in NextJS

I am working on a NextJS project where we are planning to do static HTML export of pages as described here. Here, Is the scenario I want to have worked: Say we have already statically generated the following pages.…
Jonathan Dsouza
  • 568
  • 1
  • 5
  • 17
9
votes
2 answers

What is the best approach in dynamic Vuex module initialisation when using Nuxt.js?

Lately, I have been building a large scale application that uses a lot of separate Vuex modules. Let's take a look at one of them (e.g. support-chat). Support chat is located on it's own separate page, and it would be redundant to pollute the store…
Andrew Vasylchuk
  • 4,671
  • 2
  • 12
  • 30
9
votes
3 answers

Gatsby: React conditional rendering based on window.innerWidth misbehaving

Conditional rendering of components based on window.innerWidth seems to not work as intended just in the production build of Gatsby based website. The hook I am using to check the viewport's width, with the additional check for the window global to…
Mel Macaluso
  • 3,250
  • 2
  • 12
  • 26
9
votes
1 answer

How to redirect to login page for restricted pages in next.js?

In the udemy tutorial The Complete React Developer Course the additional package history was used to get the router outside a component for redirecting when the user is not authenticated: /* AppRouter.js */ import createHistory from…
9
votes
5 answers

Next.js with FortAwesome and SSR

I am building a Next.js application and looking for an icon package that works with its SSR paradigm. After trying a few libs, I'm now working with FortAwesome/react-fontawesome, which looks promising. The problem is when the page loads the icons…
quickshiftin
  • 66,362
  • 10
  • 68
  • 89
9
votes
1 answer

How can I force Angular Universal to pre-render content from an external api?

I want to use SSR to improve search engine optimization on my angular single page application. I have enabled SSR by using Angular-Universal which is working to serve the static html but my components heavily rely on asynchronous api calls to build…
9
votes
1 answer

How to fix error:only absolute URLS are supported in react ssr graphql

I'm setting the server side rendering with apollo for set up the graphql in server side but I dont now know how I ran into this problem when ever I tried to use the query in side the one component this error appear in cli: (node:4440)…
Sajjad Hadafi
  • 347
  • 1
  • 7
  • 18
9
votes
1 answer

react-helmet mixing fields during renderStatic

I'm running server-side render of the React application. I'm using express for this purposes. The whole server-side render code looks like this: import * as React from "react" import * as ReactDOMServer from "react-dom/server" import * as express…
Limbo
  • 2,123
  • 21
  • 41
9
votes
2 answers

Is there any way to avoid "Text content did not match" warning in SSR with React?

I have set up a SSR environment with webpack and HMR. There is a statically rendered markup, that server passes to the client and a client.js bundle with ReactDOM.hydrate() method. If I change my source code, HMR works fine, but issues a warning in…
Oscar
  • 805
  • 2
  • 10
  • 24
9
votes
1 answer

Weird Next.js TTFB issue

we're running Next.js in Docker. When building the image locally and using the production backend, TTFB is virtually zero, but when we deploy this image, TTFB can be up to 30 seconds in some cases. The production servers are warm servers that…
Mike
  • 1,180
  • 3
  • 15
  • 28
9
votes
1 answer

Dynamic Meta for Nuxt.js

Can anyone help with a situation regarding meta info with dynamic data. Problem We are using Nuxt and generate our static page using npm run generate, and have identified several problems with this approach: open graph and twitter meta tags can't…
user10651574
  • 111
  • 1
  • 2
  • 5
9
votes
3 answers

the pros and const of react ssr with code splitting and now React.Lazy

I am slightly confused about the merits of ssr and code splitting and and code splitting done solely on the client. My thoughts are that server rendering the page first will lead to a better experience without all the javascript having to be parsed…
dagda1
  • 26,856
  • 59
  • 237
  • 450
9
votes
1 answer

Vue SSR (Server Side Rendering) with parcel?

I am wondering whether anyone can point me to resources or examples on how to set up parcel for vue SSR (Server Side Rendering). Or is Vue SSR not possible with parcel?
LongHike
  • 4,016
  • 4
  • 37
  • 76
9
votes
4 answers

How to log nuxt server side network requests?

Is there some way how to log all network requests which are done by nuxtjs on server side? I'm already using node --inspect to enable chrome console, but network tab is missing there. Thanks a lot for any tip.
Martin Rázus
  • 4,615
  • 5
  • 30
  • 33
9
votes
0 answers

Angular Universal App rendering incomplete list from http request in *ngFor

Every day in this journey to dominate SSR with Angular Universal I end my work day facing new issues that keeps preventing my SPA from being properly indexed by search engines. I'm using Angular 5.2.11 and all dependencies in the same version. Also,…
Felipe Micali
  • 827
  • 1
  • 11
  • 25