Skip to content
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

Fix broken Case Studies page #857

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Fix broken Case Studies page #857

merged 1 commit into from
Mar 19, 2024

Conversation

visortelle
Copy link
Member

No description provided.

@visortelle visortelle merged commit c977330 into main Mar 19, 2024
2 checks passed
@visortelle visortelle deleted the fix-case-studies branch March 20, 2024 15:58
@asafm
Copy link
Contributor

asafm commented Mar 26, 2024

How did it break?

@visortelle
Copy link
Member Author

The problem appeared after this change https://github.com/apache/pulsar-site/pull/858/files#diff-f0b43be5610a8cb248163710fe889d314ca103aea58e38abbf1af3321d8608d0R29
but we quickly noticed it and fixed it.

@visortelle
Copy link
Member Author

visortelle commented Mar 26, 2024

Array item index numbers were used for React keys. After shuffling and re-render that led to applying wrong attributes to DOM elements https://github.com/apache/pulsar-site/pull/860/files#diff-f0b43be5610a8cb248163710fe889d314ca103aea58e38abbf1af3321d8608d0L213


Another issue is that the server-side rendered HTML version differs from the browser-side version. After hitting the page refresh button, shuffling was executed in the browser, but React keys still corresponded to elements from the server-side version.
I didn't dig much and am not an expert in React SSR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants