Dynamic data not updating after prerender.
See original GitHub issueSo I created a scrollspy mixin that returns the scrollTop position via callback fn which then updates the data scrollTop
like:
// this never updates after prerenderring
<pre>{{scrollTop}}</pre>
created() {
this.$scrollspy(scrollTop => {
this.scrollTop = scrollTop;
})
},
data() {
return {
scrollTop: 0
}
}
new PrerenderSpaPlugin(
path.join(__dirname, '../dist'),
routes: ['/', '/about']
),
This works smoothly except after prerenderring. Any thoughts?
Related issue:
Issue Analytics
- State:
- Created 5 years ago
- Comments:12
Top Results From Across the Web
PreRender and Dynamic Addition of controls - MSDN - Microsoft
I am doing this in PRE_RENDER(need to do it in PreRender instead of Page_Load because page needs to show updated data after a...
Read more >Dynamic Rendering | Google Search Central | Documentation
Dynamic rendering is a workaround and not a long-term solution for problems with JavaScript-generated content in search engines. Instead, we recommend that ...
Read more >Why Dynamic Rendering Is Not a Long-Term Solution | Onely
Dynamic rendering may significantly slow down your server. A large amount of prerendering requests can make the renderer fail, so as a result, ......
Read more >Data Fetching: getServerSideProps - Next.js
Fetch data on each request with `getServerSideProps`. ... Dynamic API Routes ... frequently updating data, and you don't need to pre-render the data, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Odd, I don’t see anything that should cause the issue in any of that code. I might need to try and reproduce the issue when I’m free.
@Tribex got it! I’m maximizing the
postProcess
method. 😄 Thank you so much!