fix: improve conditions for missed payload case#1648
fix: improve conditions for missed payload case#1648danielroe merged 23 commits intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughThis pull request modifies package page hydration and server-rendering logic whilst extending the readme type definition. The changes introduce a Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧭 Context
We have a rare scenario where the user receives HTML, but when they subsequently make a request for the payload, the payload is in the prerender state and a fallback value is returned. After XXX, this behavior is handled well, but there was a chance the user would receive an empty payload, resulting in flickering during page rendering
📚 Description
On the client, we need to wait not only for hydration to complete, but also for the data loaded on the server [before sending response] to be received. Configured for the main data (pkg and readme) - the rest are non-critical (and usually loaded faster then this two) and it feels fast this way.
There's also a case where the payload exists, but the status is marked as idle or pending, which also caused flickering. Updated the conditions to check the data availability, not the status