Questions tagged [react-lazy-load]

95 questions
0
votes
0 answers

How can I introduce a buffer to React-leaflet?

I'm currently using React-leaflet to plot and pinpoint data. However, I have a massive amount of data to display, so I'm trying to introduce a buffer using Lazy, Suspense or Loadable. But when I structure it with React-leaflet in Map.js and then try…
0
votes
0 answers

React-lazy-loadin-image-component fade not disappear on mobile

Im using react-lazy-loading-image-component library in this site if you scroll down you can see that the image fade is not disappearing after the image fully load someone knows to to fix that (it’s happening only in…
0
votes
0 answers

React Suspense is not showing fallback second time component renders

I am doing some heavy operations inside field component and it is taking some time to render the component. So i am using react suspense to show loader. When i turn on editMode first time, able to see fallback. but after first time if i turn on edit…
0
votes
0 answers

How to handle lazy loading error in react

I'm trying to handle errors in React.lazy, for that I made the following component to which I pass the load function as parameters: import React, { useState, useEffect, ReactElement, ComponentType } from 'react'; import { useErrorBoundary } from…
jesusrlm
  • 35
  • 8
0
votes
0 answers

Can i use React lazy and React Transition Group together?

I have a question. Can I use React lazy with React Transition group? (for example load component with lazy and after loaded add animation)? I would try do it in this sandbox: https://codesandbox.io/s/billowing-butterfly-58vp0s?file=/src/App.tsx
0
votes
0 answers

How to load Dynamic lazy loaded JS chunk in build

Issue I am facing After creating a build when I serve the application, the dynamic import chunks are missing a / in request URL. Instead of loading https://example.com/adminapp_routes_Dashboards_DashboardPage_js.chunk.js, it should request for…
Chandler Bing
  • 410
  • 5
  • 25
0
votes
1 answer

Lazy Loading in React - improves first page load, but makes all other page loads less smooth because of subsequent loads

In our React application's App.js file, lazy loading components that are not needed on the initial page load definitely helps with the speed of our first page load. However, it also seems to have a negative impact on the rest of the website's…
Canovice
  • 9,012
  • 22
  • 93
  • 211
0
votes
0 answers

Failed to fetch dynamically imported module from portal component

I create a portal component(InboxModal). and I want to show it when I click a button with lazy import. but when I call that I got this error: Failed to fetch dynamically imported module:…
Hasan Cheraghi
  • 867
  • 2
  • 11
  • 26
0
votes
0 answers

using react suspense and react react lazy each one inside of a different component ? one in app.tsx and the other inside of a private route?

I am trying to separate react lazy in 2 separate modules , due to the fact that I want to make my private route take multi components not only one. my current app.tsx module looks like the following : import React, { useState, useEffect,…
Richardson
  • 1,804
  • 10
  • 38
0
votes
0 answers

React-beautiful-dnd: lazy loaded component keeps falling back to suspense when dragged

I have a react component that dynamically loads a widget component using react lazy, with the component path passed as a prop. It renders fine, but when I drag it, the component flickers between its Suspense fallback and the fully rendered…
0
votes
0 answers

tsc --project build does not code split lazy loaded component

NPM Start Command -> "start": "cross-env react-scripts start" NPM Build command: build: "tsc --project tsconfig.server.json && yarn copy:all && yaarn clean:temp && yarn generate:gitignore && yarn copy:assets && yarn terser-folder" Any additional…
Yeshwanth Kumar
  • 81
  • 1
  • 1
  • 8
0
votes
1 answer

Next/React lazy load not working as expected for components

Hi all I am new in Next/react I am trying to lazy load one component. What my expectation is that component must loads when it is visible in user view port or once a page is fully rendered. Its html code should not come in the first response. But…
Vivek Singh
  • 646
  • 3
  • 10
  • 25
0
votes
1 answer

React.lazy and custom protectedRoute with router-react-dom, how do I get it to work?

I'm new to react and is trying out the React.lazy and Suspense imports, and I just have to say, I love them!!! My website went from 45% in performance up to 50-60% and that is without optimizing images! Google search results, here I come! However, I…
Marty
  • 1
  • 1
0
votes
1 answer

When importing a module from node_modules that uses route based lazy loading in create-react-app, should code splitting work in the same way?

I used create-react-app (react ^17.0.2, react-scripts 4.0.3) to knock up a simple application which uses route based lazy loading to perform code splitting. When I build this application I see separate chunks created per lazy loaded component and…
0
votes
1 answer

Lazy-loading React components under SSR

I have a ReactJS app built with react-lazy-load-image-component in order to improve performance. My code wraps components that take time to initialize with something like:

Categories

{categories && …