-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double rendering pre-rendered pages #55
Comments
Is this an issue with this template specifically? |
This line in the template: should be changed to <div id="preact_root"> to avoid the double rendering issue described above, for anyone who uses this template and adds anything else to the html body. Because Preact assumes that the root element has id |
I added a div on the Good catch @mrbrianevans |
Ok, should be fixed now |
We have changed from id `app` to id `preact_root` but forgot to change the CSS accordingly. See - preactjs-templates#55 - preactjs-templates#56
Pre-rendered pages render twice if navigated to directly by URL, if the HTML template has been changed (elements added to the body).
This is due to the main div id being
app
, but preact looks for either the first div, or one with idpreact_root
. A lot more info about this is available on this issue:Originally posted by @developit in preactjs/preact-cli#1330 (comment)
The text was updated successfully, but these errors were encountered: