Questions tagged [server-rendering]

63 questions
0
votes
3 answers

Multiple react apps in a single page and keep them in sync

I have e-commerce based page. The entire page is not wrapped within a single react app. The bulk of the page's static content is rendered on the server-side using EJS. Upon rendering on the client we initialize two isolated react apps with their own…
NiK
  • 1,827
  • 1
  • 20
  • 37
0
votes
2 answers

How could do some http requests just from the server side in Angular Universal

I'm implementing Angular Universal over an Angular project to hide some http requests, but in my research, I found that I can't hide those with the way provided by Angular. Did someone try to do the http request in the express engine an retrieve the…
AndresSp
  • 176
  • 3
  • 16
0
votes
1 answer

Server render cannot get the nested route string

When I visit /m/song, the htmlstring only contains Layouts component htmlstring = renderToString( {renderRoutes(routesConfig)} …
0
votes
1 answer

Meteor-React-ssr - Asks for 'templating' package when i have 'static-html' Installed

I am trying to implement meteor-react server-side rendering. I have removed the templating package and added static-html package as is the case when using react for ui in meteor. The issue now is that when I run the app with any server side…
0
votes
1 answer

Is there a way to get a HTML as Browser will render it, CSS and JS

I'm looking for a way to render an HTML, and get the whole document source of if after a browser (let's say firefox), renders it... The thing is that I'm using some numbering, just the looks, such as CSS ::before or javascript to highlight code…
ekiim
  • 792
  • 1
  • 11
  • 25
0
votes
2 answers

Angular 2+ SEO for web crawlers

I have my angular 4+ webapp which have a different header on different routes.All the components loads through angular code hence, everything is javascript and there is not much HTML except root component.Due to this, the google is not able to crawl…
0
votes
2 answers

Javascript server-render libraries with non-JS REST APIs

Are server-rendered frameworks/libraries (such as Nextjs for React, Nuxt for Vue) and non-JS REST API backends (i.e. Java, Django, Go etc.) mutually exclusive or can they be used alongside? Specifically, I am using Go for building a REST API at the…
vahdet
  • 6,357
  • 9
  • 51
  • 106
0
votes
1 answer

React client side componentDidMount not working properly (server side rendering)

Hello Stackoverflow community sorry in advance if my explanation is not clear enough when a user types a url directly. the server makes a request, fetch the corresponding data and renders to screen. and this works perfectly when a user clicks on a…
mayo19
  • 647
  • 8
  • 16
0
votes
1 answer

Nuxt window is not defined on server-side rendering

I am trying to get the authorization headers from localStorage inside my middleware. Unfortunately this doesn't work on the first page load, because it is server-rendered. How could I fix this? const cookieName = 'feathers-jwt'; import {…
0
votes
1 answer

How to do React server rendering if the page is different depending on whether the user is logged in?

For example, if I have page called home. When a user logs in, he will see his avatar on the navigation bar. If a user does not log in, he can see a log in button on the navigation bar. I use Redux to manage state, and React Router to do the…
zhuscat
  • 604
  • 1
  • 6
  • 12
0
votes
1 answer

how to define global scope event handler for React server-side rendering

Comparing with client side rendering, I prefer to use server-side rendering for an application with little user-interaction.and webpack is the choice for compiling server side code. There is a scenario I want to update table's marginTop once the…
ryu
  • 651
  • 9
  • 23
0
votes
1 answer

React-router on server always renders root route

I've already spent half a day on this issue and can't find what is wrong. I use react-router on server. But for every route, it renders the same component (the one from root route). Here is my server: //routes import routes from…
ElMent
  • 158
  • 2
  • 11
0
votes
1 answer

How to render component in react server side with async data

I searched a lot and didn't find any implementation to load data async in react server side before render the markup without any flux (redux) implementation. Here's the view (both api and views together): class Home extends React.Component { …
Ashish Rawat
  • 3,363
  • 5
  • 29
  • 35
0
votes
0 answers

How to make a server rendering with part of the code run only on a client?

I have window dependency in some of modules I use, so I cannot render part of my app on a server. However the content send from a server should be the same as a content rendered on a client first time, otherwise there will be a: "React attempted to…
Ross Khanas
  • 1,491
  • 2
  • 15
  • 23
0
votes
1 answer

React server side rendering checksum warning

I have a file upload component. IE8: Using iframe for file upload. Chrome: Using FormData When doing server rendering, iframe is created in HTML. When Chrome loads the page, there's no iframe. So the waring is caused: Warning: React attempted to…
jasonjifly
  • 347
  • 1
  • 3
  • 15