Questions tagged [react-loadable]
137 questions
0
votes
1 answer
React Loadable SSR - chunks are loading twice
I am adding js chunks in html using below tag
at the end of body tag
The same chunk is being loaded again from the UI script.
I am using v5.4.0 of react-loadable.
Has anyone…

Pranab Gupta
- 350
- 2
- 10
0
votes
1 answer
react-loadable - dynamically loaded code is still being bundled
I have the following code, where boxes.jsx should be dynamically loaded when a particular route is hit:
...
import Loadable from 'react-loadable';
const LoadableBoxes = Loadable({
loader: () => import('../pages/boxes/boxes.jsx'),
loading: ()…

JoeTidee
- 24,754
- 25
- 104
- 149
0
votes
0 answers
How use react-loadble for code spitting with ssr?
After breaking, I get empty chunks and a bundle array.
I completely do everything as written in the documentation.
To get started, wrapping a component
// index.js
import React from 'react';
import Loadable from 'react-loadable';
const…

Vladimir Golub
- 523
- 1
- 8
- 22
0
votes
1 answer
React loadable to be used with two repos/create-react-app
I am trying to use react-loadable with two repos / two different application made by create-react-app
I have used npm link to connect the two application and in the parent application I have used the child application using the below code
//parent…

Saket
- 36
- 4
0
votes
1 answer
Cannot read property 'then' of undefined | When i try to import a component with babel-dynamic-import
I am trying to import a react component with @babel/plugin-syntax-dynamic-import but i can not make it work.
Here is my code in my main componant :
import React from 'react';
import Loadable from 'react-loadable';
const Test = Loadable({
loader:…

Anatole Lucet
- 1,603
- 3
- 24
- 43
0
votes
1 answer
Need an appropriate loader to handle this file type
I am going to implement code splitting with server side rendering. For that i am using react-loadable.
But, i am getting following error while using import.
I show other posts but, nothing work for me.
You may need an appropriate loader to handle…

ketan
- 19,129
- 42
- 60
- 98
0
votes
1 answer
react-loadable multiple resource loading not working
To increase the site performance I was thinking of code splitting some of my components which I don't need at the initial build. After looking for some options I decided to go with react-loadable.
According to react-loadable docs, we can load…

Aziz
- 928
- 1
- 10
- 18
0
votes
1 answer
Code splitting increases entry bundle size when using create-react-app
Here is the relevant code before manual code splitting:
import React from 'react';
import {BrowserRouter, Switch, Route} from 'react-router-dom';
import Protected from '../container-components/authentication/protected.js';
import LoginContainer…

qdog
- 151
- 1
- 9
0
votes
1 answer
Am I truly using http2?
I have never setup http2 but I think cloudflare serve request as http2.
However, when I see dev tool water fall it looks like http1.
Because of the when I just test with http2 testing site it show I am serving http2.
As you see it kinda fetching…

fiddlest
- 1,262
- 2
- 17
- 42
0
votes
1 answer
Delay prop does not work, loading prop "flashing" without delay
I am using react-loadable@5.5.0 for code-splitting on a basic web app. Whether I set the delay prop or not, the loading spinner flashes immediately on page load with no delay. I've stripped down the app to remove some of the routing logic, removed…

bcaspar
- 163
- 1
- 9
0
votes
1 answer
React-loadable doesn't work with css modules
I did everything according to the React-loadable documentation, but it doesn't work with css modules.
I'm using server-side rendering.
Error on client:
TypeError: Cannot read property 'call' of undefined
at __webpack_require__ (bundle.js:768)
…

Daryn K.
- 671
- 2
- 12
- 23
0
votes
1 answer
does 'react-loadable' excepts exact path to the component?
I am making use of 'react-loadable' in my application to lazy load some of the components that I don't want to render as soon as application loads, currently I am following route based code splitting.
My file structure:
Contents of…

Divyanshu Rawat
- 4,421
- 2
- 37
- 53
0
votes
1 answer
React Loadable SSR isn't always giving client complete list of bundles, leading to page flash
I've been struggling for the last few days to eliminate page flash. My project started with create-react-app, then I used help to set up SSR and various other options. When I started running into problems, I stripped my code down and ejected. Here…

nebain
- 113
- 7
0
votes
1 answer
React-Loadable with third party react component not working
I am trying to use react-loadable on third party react components. It is just showing blank page. When I used it to code split my own components, it worked fine.
import React from 'react'
import Loadable from 'react-loadable';
const Loading = ()…

texan2018
- 21
- 4
0
votes
1 answer
Javascript: generalizing react-loadable with closure
I am using react-loadable to load the views. The code below works fine:
const Home = Loadable({
loader: () =>
import ('./views/home'),
loading: Loading,
});
But I have multiple views, hence I want to generalize (refactor) the above…

Nadeem Jamali
- 1,353
- 3
- 16
- 27