-
Notifications
You must be signed in to change notification settings - Fork 90
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
#issue 187 lazy load - dynamic import #218
Conversation
✅ Deploy Preview for astonishing-pothos-5f81bd ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
please ask me for review once conflicts are resolved
0290656
to
68a6f47
Compare
import React, { lazy, Suspense } from 'react' | ||
const DashboardPage = lazy(() => import('../pages/dashboard/DashboardPage')) | ||
const TimelinePage = lazy(() => import('../pages/TimelinePage')) | ||
const GapsPage = lazy(() => import('../pages/GapsPage')) | ||
const GapsPatternsPage = lazy(() => import('../pages/gapsPatterns')) | ||
const RealtimeMapPage = lazy(() => import('../pages/RealtimeMapPage')) | ||
const SingleLineMapPage = lazy(() => import('../pages/SingleLineMapPage')) | ||
const About = lazy(() => import('../pages/About')) | ||
import CircularProgress from '@mui/material/CircularProgress' |
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.
it won't do the trick.
we want to wait with the loading until the user clicks the menu item - that's not what your code is doing
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.
my bad.
after reading the documentation, you're 100% right.
it will solve the issue perfectly.
thanks!
Description
implemented lazy loading for the pages using daynamic import #issue 187