-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
[docs] Fallback for searchbar during SSR #46364
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
- Extract SearchButton styled component and related components into separate SearchButton.tsx file - Add TypeScript interfaces with optional onClick prop that disables button when not provided - Use React state for keyboard shortcut to prevent SSR hydration errors - Update AppFrame to use SearchButton as Suspense fallback for better UX 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Netlify deploy previewhttps://deploy-preview-46364--material-ui.netlify.app/ Bundle size report@mui/material parsed: 0B(0.00%) gzip: 0B(0.00%) Show details for 100 more bundles (86 more not shown)@mui/lab/AdapterDateFns parsed: 0B(0.00%) gzip: 0B(0.00%) |
The esmExternals experimental option is no longer needed in modern Next.js versions and has been removed from the docs configuration.
…js config" This reverts commit 5a1ecf3.
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.
much better!
Was looking into this code for another purpose and this annoyed me, had Claude Code update it to show a proper fallback for the searchbar. We can just extract the presentational part of the searchbutton and show as fallback, it won't affect the bundle size much. Only the shortcut is hidden until after hydration.
Not sure why, but for me this improves the perceived performance.