-
Notifications
You must be signed in to change notification settings - Fork 70
Anilink changes classes of sibling divs #248
Comments
I am experiencing something similar. A grid of cards, some wrapped with divs, but most wrapped in AniLinks, is causing really strange problems, but only in production, which makes this great to debug. First of all some classes (using Tailwind) were missing for only one specific card / the card had the wrong classes. I was also not able to change them. This first issue seems to have been "solved" by replacing the AniLink tag of a sibling with an anchor tag. An semantically identical card in the same grid had no problems. Second of all, another card, that was not wrapped in an AniLink tag, somehow caused a section > div without the transition-link-portal class to be appended to the bottom / body of the page. As this issue seems to behave somewhat similar to issues that arise without using persistent layout, The second issue was "solved" by removing all AniLinks from the page. I also just tested replacing "cover" with "fade" and wrapping the AniLink tags in an additional div as @toppsdown stated and both indeed solved the second issue for me. |
This started now to affect another page, without me understanding how that came to be. The problem was not reproducible in development though. Develop: Build, then serve: I again wrapped the AniLink in an additional div and have it now working again normally. |
So I just learned about the React hydration issue:
I'm guessing whatever issue is happening here is related to that |
Hi there, I've been dealing with a super weird issue which I have now narrowed down to a problem with Anilink. In development, everything works fine. But in production, when the javascript initializes on the page, the classes of divs that are siblings of Anilink get rearranged which causes all sorts of problems.
I've reduced this to a basic working case on my local machine:
React Code
HTML generated in production build
HTML after javascript initializes
Notice that the class names have all been moved up one.
Mitigations
If there's anything else I can provide to help diagnose, please let me know. Thanks!
The text was updated successfully, but these errors were encountered: