Skip to content
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

Implement Code Splitting and Lazy Loading #14

Open
lazarevtill opened this issue Apr 6, 2025 · 0 comments
Open

Implement Code Splitting and Lazy Loading #14

lazarevtill opened this issue Apr 6, 2025 · 0 comments

Comments

@lazarevtill
Copy link
Contributor

Implement Code Splitting and Lazy Loading

Problem:
All components are loaded eagerly, which can slow down initial page load.

Recommendation:
Implement code-splitting and lazy loading for non-critical components.

// In app/components/layout/layout-app.tsx
import dynamic from 'next/dynamic'

// Lazy load non-critical components
const Settings = dynamic(
  () => import('@/app/components/layout/settings'),
  { ssr: false, loading: () => <SettingsSkeleton /> }
)

const FeedbackWidget = dynamic(
  () => import('@/app/components/chat/feedback-widget'),
  { ssr: false }
)

Impact: Medium - Improves initial load performance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant