Client-only data triggers React checksum mismatch
Open
discussion
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
We cache server HTML in a CDN and make a user data query on the client only. This updates the top navigation bar markup on the client to include the logged-in user's name, etc. Doing this triggers a React checksum mismatch since the render tree is different. Delaying the query triggers other errors, like setting state in `componentDidMount`.
Are there any best practices for doing client-only queries? (directives, etc) How does one avoid this mismatch?
Contributor guide
Assessment
This issue has not been assessed yet.