Questions tagged [react-loadable]

137 questions
0
votes
1 answer

How to get state via React-Loadable? React-Redux

I written a custom logic for handling async route loading bundles in react-router-dom .v4. It's work perfectly. But also I heard about useful package with nice API to do the same, like React-Loadable. It has one problem, I cannot get the props/state…
Max Travis
  • 1,228
  • 4
  • 18
  • 41
0
votes
1 answer

React Loadable requesting new css in dynamically loaded components

I'm using react loadable to code split off components. I'm also using Extract CSS Chunks to split my stylesheets up. Everything works great during server side rendering and the initial client side render, but when I transition to a new page and a…
Thomas
  • 2,356
  • 7
  • 23
  • 59
0
votes
0 answers

Webpack bundles are all same and look like a markup?

I make app.client.js and app.server.js bundles, plus I perfom code splitting and create vendor.chunk.js 1.chunk.js (this one should be my component bundle thas is uploaded on request). When I take a look at them, they are all different, but when I…
0
votes
1 answer

react-loadable babel-plugin-import-inspector is not working

Issue: when i try to launch node server console screams: /@babel/core/lib/transformation/file/file.js:173 throw new Error("This API has been removed. If you're looking for this " + "functionality in Babel 7, you should import the " +…
Evgeny Kobzev
  • 89
  • 1
  • 12
0
votes
1 answer

React loadable server side rerendering and refetching when browser takes over

I have been trying to use react loadable library with Webpack 4. On the SSR the page loaded correctly(all async import stuff loaded). However, the async components are gone for a split sec. react-loadable.json does not seems to have correct info…
fiddlest
  • 1,262
  • 2
  • 17
  • 42
0
votes
0 answers

show previous component till next component get loaded

i am using react-loadable to load the component when required but in react-loadable we have to show some loading component till the component get loaded in background but i want to show previous component till the next component get loaded. Please…
0
votes
1 answer

Code splitting with React Loadable and routes with containers

I want to achieve code splitting of every main route so every page will have its own file (along with its subcomponents), for example I have a main render function with Route components that points to containers:
shinzou
  • 5,850
  • 10
  • 60
  • 124
0
votes
1 answer

Decide which route inside to render based on a condition

I have two kinds of routes: a user and a project route. The user route is a top-level URL resource, while project belongs to a user. For example: /users/1/foo and /users/1/projects/2/bar. I want to show a component specific to a user route only when…
Maciej Gurban
  • 5,615
  • 4
  • 40
  • 55
0
votes
1 answer

Route based code splitting with webpack not working, Chunks not generated

I'm trying to implement route based code splitting in my application on a nested route. I want to break a main routes child routes into a chunk separate from the main chunk. mainRoutes.js ... (other routes) { path: '/dashboard', component:…
Deepank
  • 717
  • 2
  • 8
  • 15
0
votes
3 answers

In React: Module not found: Can't resolve 'react-lodable'?

I am new to react. I am getting an error ( Module not found: Can't resolve 'react-lodable' ) while doing routing in my react app. Here is my code: route.js: import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; import React, {…
Shubham Verma
  • 8,783
  • 6
  • 58
  • 79
0
votes
0 answers

react with react-loadable not rendering async pages during SSR

I'm creating a new project that incorporates react SSR with react-loadable. (based on https://github.com/jamiebuilds/react-loadable/tree/master/example) The react-loadable docs mention that I need to add "Loadable.preloadAll()" to make sure that the…
Cornel Janssen
  • 681
  • 1
  • 11
  • 33
0
votes
0 answers

react-loadable / redux - state is not initiated even createStore is called

I have started splitting code with react-loadable and all was good until I wanted to use this.props. Digging deeper I found out that redux state is empty like createStore was not called at all. Console logs in createStore show that it is initiated…
0
votes
1 answer

React Router 4 + Code splitting | Component remounts

I have the next code: import React from 'react' import Loadable from 'react-loadable' import { Route } from 'react-router-dom' class App extends React.Component { state = { kappa: false } componentDidMount() { …
Limbo
  • 2,123
  • 21
  • 41
0
votes
1 answer

react-loadable import dynamicaly object with components as properties

I have an index file where I export all of my SVG components: import Twitter from './Twitter'; import Upload from './Upload'; import Cloud from './Cloud'; import Share from './Share'; import Eye from './Eye'; import Trash from './Trash'; import…
Tomasz Mularczyk
  • 34,501
  • 19
  • 112
  • 166
-1
votes
1 answer

how to prevent re-rendering components with redux

How to prevent component re-rendering, when i have an hierarchical array of objects (array of objects) using redux dispatching and memo for example i have like this list of list of components like Elements =[ // an array in store.state variable …
Ayoub Benayache
  • 1,046
  • 12
  • 28
1 2 3
9
10