Skip to main content

All Questions

1 vote
1 answer
77 views

React lazy components with poor internet connectivity and error boundaries: Failed import due to poor connectivity seems to be cached even when online

In an "offline-first" app (which optimistically updates local state and gracefully handles errors by rolling back local state changes, for example), some features may still require internet ...
Audiopolis's user avatar
1 vote
1 answer
923 views

NX and react router lazy doesn't split bundle

I am trying to use react router with lazy loading. I still see the bundle being downloaded as one main.js. The router resides in an nx application and the routes that should be lazy loaded are in nx ...
Danny's user avatar
  • 11
3 votes
0 answers
2k views

React Lazy Import does not include CSS files

I have a react app setup with CRA. In my App.js I would load my css files, components and define my routes. import 'semantic-ui-css/semantic.min.css'; import './css/global.css'; import './index.css'; ...
Alk's user avatar
  • 5,577
1 vote
1 answer
874 views

How can I import multiple functions or components from a package using react lazy

I have to replace the usage of loadable with react.lazy This is how it was with loadable: const loadReactIntl = () => import('react-intl'); export const intlProvider = () => Loadable({ loader:...
adabuyaman's user avatar
2 votes
1 answer
2k views

What is the point of single page large applications if you have to split your code to improve performance?

I've been reading about lazily loading code in react. With lazy loading, only the needed code will be loaded and doing so, your initial loading will be faster (because you will load much less code) ...
Rhea Sanjan's user avatar
2 votes
0 answers
1k views

React.lazy returning 404 error when attempting to lazy load components

I'm attempting to convert my React application to lazy load components dynamically to increase the Lighthouse performance score and have been following the React Code Splitting Documentation in order ...
Sean Moody's user avatar
0 votes
0 answers
1k views

How to apply lazy loading to react-router-dom?

I have a basic routing with two pages: home and about. I've imported both pages with react.lazy and wrapped each of them with a suspense fallback. The homepage loads well, but when I want to navigate ...
DoneDeal0's user avatar
  • 6,317