-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: Improve S2 docs bundle size #8891
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
Conversation
matches changes in Parcel for ReactStaticPackager
Build successful! 🎉 |
return document.getCollection(); | ||
}, [document]); | ||
let collection = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); | ||
useLayoutEffect(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug found on the illustrations page when wrapping a collection in Suspense: when switching illustration types, the content would not update in the collection. This was because during Suspense React "unmounts" effects by calling their cleanup functions, but doesn't actually remove the component from the DOM. Before it re-mounts the effect, it removes the old content from the collection. We had this optimization where we ignored removals when unmounted, so these would never be processed. I tested in Storybook with our large collection stories and didn't notice a performance issue without this, so perhaps we fixed the original issue somewhere else in the meantime.
Build successful! 🎉 |
Co-authored-by: Robert Snow <[email protected]>
Build successful! 🎉 |
…rcel # Conflicts: # packages/dev/s2-docs/src/Layout.tsx
Build successful! 🎉 |
Uh oh!
There was an error while loading. Please reload this page.