Having a really strange issue that I think I’ve narrowed down to my Project
I set up a blank repo to recreate. If you change the credentials, check the console log and navigate between the links. You’ll see a double render with the bottom creds. I can’t find any settings to recreate this problem, but it’s been plaguing me for a while
this is the difference between the project keys. My main project double-renders on every page view, where the test project using the same codebase only renders once. I can’t find any differences in the projects or components - I tried to set them up identically
Hi @efficient_pelican! Sorry, we’re still trying to figure out the root cause. However, if it helps, it seems that removing the Full Width variant from Collection.Template seems to fix it somehow
@victor Interesting. Though I believe it’s happening across all components. Could this be something with global variants? I don’t have any but I have created in the past
Looks like it’s related to React 18’s concurrent rendering.
It seems React expects to rerender the entire tree in some situations when it’s doing concurrent rendering, even if no React rule is violated (see here and here).
The second re-render of most components (including App and Template) is not caused by any change in props or state and it happens to the entire tree. In general it should be safe since the render function is expected to be pure.
I’d be happy to look into the animations issue, it might have been caused by a component that doesn’t support concurrent rendering - feel free to DM to point me the repo if it’s OK for you!