facebook / relay

Relay is a JavaScript framework for building data-driven React applications.
https://relay.dev
MIT License
18.38k stars 1.82k forks source link

Client-only data triggers React checksum mismatch #1957

Open staylor opened 7 years ago

staylor commented 7 years ago

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?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

achilsowa commented 3 years ago

ok

yishengjiang99 commented 2 years ago

afa