question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default/Home page always rendered with SSR

See original GitHub issue

Not sure if this is related to @stencil/router or @stencil/core.

The default/home page (that handles the / path) is always being rendered with server-side rendering. This happens even if I set exact to true.

Expected behaviour: Router should render a single route that matches the URL.

Current behaviour: Router is rendering the default route, as well as the route that matches the URL.

To reproduce this issue, you can clone any of these repos, build the app, then run node server.js:

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ihadeedcommented, Sep 3, 2017

My guess: the home page always shows up because it’s pre-rendered when running stencil build. The server-side renderer then takes that page and renders the router contents again.

0reactions
jthoms1commented, Sep 5, 2017

Yes this was an issue in @stencil/core. It was fixed with ionic-team/stencil@9839cafa347077d9ab62bffa14663c4b4f7b9bdf

Read more comments on GitHub >

github_iconTop Results From Across the Web

Next js - disable server side rendering on some pages
Is it possible to disable ssr on some pages ...
Read more >
What is server-side rendering and how does it improve site ...
Server-side rendering ensures that website content appears quickly, without first having to download and run application code.
Read more >
Basic Features: Pages - Next.js
By default, Next.js pre-renders every page. This means that Next.js generates HTML for each page in advance, instead of having it all done...
Read more >
Server Rendering with React and React Router - ui.dev
In this comprehensive, up-to-date guide, you'll learn how, why, and when to add server rendering to a React and React Router application.
Read more >
Demystifying server-side rendering in React - freeCodeCamp
Server-Side Rendering — SSR from here on — is the ability of a front-end framework to render markup while running on a back-end...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found