-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
SSR - classes are not re-applied on hydration without a ref #7787
Comments
You should do it in |
Why does it work with a ref then? This is basically the same as #7063 but with a different attribute. |
Is there a particular reason that #7063 qualifies as a bug but this does not? |
This issue still exist and has no workaround expect adding a ref to every single element which is not very elegant way! |
Version
2.5.14
Reproduction link
No ref: https://codepen.io/anon/pen/yKyBYZ
With ref: https://codepen.io/anon/pen/PRwYPO
Steps to reproduce
Open the codepen
What is expected?
.has-padding
should be applied after 2secWhat is actually happening?
Nothing changes on hydration unless the element has a ref
I opened a similar issue a while ago but for styles - #7063
Same thing happens with custom attributes btw, I'd expect this to give a "mismatched nodes" error at the very least:
No ref: https://codepen.io/anon/pen/qoExmb?editors=1010
With ref: https://codepen.io/anon/pen/oqgEWL?editors=1010
Text is fine though: https://codepen.io/anon/pen/OvPQQv?editors=1010
The text was updated successfully, but these errors were encountered: