Questions tagged [react-loadable]

137 questions
2
votes
0 answers

React lazy loading

I have an application in which I have an export feature. if the user clicks on the menu 'export', I will call a function in my export store and get the data and export it into a Excel file. I am using the library XLSX for exporting and I wanted to…
Afflatus
  • 933
  • 1
  • 12
  • 39
2
votes
1 answer

Passing arguments to 'loader'

I have a parent component A, creating a child component B. This child component's definition is imported using Loadable. In the following, component B is the Catalog. Now I want to fetch some initial data before rendering this component, as it is…
Chuck
  • 351
  • 1
  • 6
  • 20
2
votes
2 answers

webpack 4 react loadable is not spliting vendor base on chucking point

I am currently using webpack 4 with react loadable to create chunks. It actually chunks depends on the break point. However, vendor size remains same. React loadable is not supporting webpack 4 yet ? or I am missing some setup ? css actually seems…
fiddlest
  • 1,262
  • 2
  • 17
  • 42
2
votes
1 answer

React loadable import connect component

I'm trying to make react-loadable work with ServerSide Rendering. I've got a quite big app using multiple HOCs which connect components, add routers etc. Components seem to go okay, instead the smart components connected via react-redux or other…
ronnyrr
  • 1,481
  • 3
  • 26
  • 45
1
vote
1 answer

Import component from published npm package using react-loadable, cannot find module error

I am trying to import components from a published npm package dynamically using react-loadable. The import is successful with components located in the src/ folder. However any components that I try to import from node_modules produces the following…
1
vote
1 answer

Chunked loading of assets for CRA SSR

I am trying to chunk my assets and lazy load them using react-loadable. I used the following renderToString: renderToString( modules.push(m)}>
1
vote
0 answers

Using React Context to Integrate Firebase Cause Infinite Loading When Import Component using Loadable

I'm trying to integrate Firebase to React using React Context. The React project uses the Able template. When I wrap my App component with ContextProvider, it causes an infinite loop. Here is the code: ./Firebase/firebase.js import React, {…
resant
  • 31
  • 2
1
vote
0 answers

How can Add a Loader for the whole page in Reactjs?

I want to add a Loader when any API call is happening. My application have layout with Header, Footer, Side Menu, ContentComponent. I want to show overlay loader on the whole page. Tried with…
Gnik
  • 7,120
  • 20
  • 79
  • 129
1
vote
1 answer

React Loader - Trying to get a loader when api request is made and to stop it when response is fetched

What I want is that, when I click on search button, then a loader/spinner should appear on screen until the data is fetched, when the data is fetched it should disappear. Container.jsx import React from 'react'; import './container.css' import…
1
vote
0 answers

How to config webpack-4 to generate multiple chunks for code splitting?

I already set multiple different webpackChunkName in react-loadable, I set 10 different chunks, but only got 5 chunks. Some chunks were combined, I want to get 10 different chunks. how to config it? THX export const AsyncAAA = Loadable({ loader:…
Ryan Yu
  • 11
  • 2
1
vote
0 answers

load dependent modules in chunks with react loadable

The Application (build in "react": "15.4.1" ) has some dependent modules.Dependent Modules are referred in package.json : "git+https://git.xyz.net/myApp/ui/myModule.ui.git#v0.0.4",. myModule has same logical entities. Now I applied lazy loading on…
Prabhat Mishra
  • 951
  • 2
  • 12
  • 33
1
vote
2 answers

Adding React.lazy or react-loadable and doing dynamic import (Code splitting) causes some of my functionalities to breaks

I was looking for a way to import my components dynamically, simply by using their name, after looking for a while i got to know about code splitting and things like React.lazy, react-loadable, and loadable-component, i made a few test case and…
1
vote
2 answers

React SSR blinks page

I created a project with React, react-router, @loadable/component. Now I'm trying to add SSR to this project. I did server side rendering with react-router. And then I added @loadable/component to import all pages component: import loadable from…
Oleg
  • 1,048
  • 1
  • 9
  • 18
1
vote
0 answers

react-loadable higher order component

I'm trying to use react-loadable to implement code splitting, and as suggested in the docs I've created a HOC for it, like this: export default function({ componentPath }) { return Loadable({ loader: async () => { const component =…
Mustafa Magdy
  • 1,230
  • 5
  • 28
  • 44
1
vote
0 answers

SSR: Deferring certain components for loading on the client (especially those with window in them)

So, I'm moving from react-async-component to react-loadable bc of a bug that isn't being fixed. react-async-component has this nifty serverMode that allows you to tell it to never load a component on the server. This can be useful for admin screens…
Marc
  • 6,773
  • 10
  • 44
  • 68