Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Prerender Parent component and all its children except one #1123

Closed
fatjoni opened this issue Jul 17, 2017 · 1 comment
Closed

Prerender Parent component and all its children except one #1123

fatjoni opened this issue Jul 17, 2017 · 1 comment

Comments

@fatjoni
Copy link

fatjoni commented Jul 17, 2017

My situation is this: I am building a single page website and parts of the page are different components. I need to integrate a map from highcharts but i cannot find a way to include it as part of the same parent while excluding from prerendering in the same time. The whole app only works if i move it from shared.ts to client.ts. This hits the websites prerendering benefits. Can you help me on this?
Thank you

@SteveSandersonMS
Copy link
Member

You'll need to use a test in your code like this one to ensure that client-only code only executes on the client.

There isn't a straightforward way that I know of, with either Angular or React, to just mark a whole component as not to be included during server-side prerendering. But for more details about Angular/React APIs, please check their docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants