reactjs


The last route fetches all the chunks with code split with webpack 2 and react-router v3:


I'm trying to implement dynamic route loading for 3 flows of my app. This is how I'm doing it
routes.js
<Route component={App}>
{flow1Routes}
{flow2Routes}
{flow3Routes}
</Route>
flow1Routes.js
export default <Route getChildRoutes={(loc, cb) => {
System.import('./flow1ChildRoutes')
.then(m => cb(null, m.default))
}} />;
flow1ChildRoutes.js
export default (
<Route>
<Route path="..." component=... />
<Route...
</Route>
);
And the same way for flow2Routes and flow3Routes.
The problem is that when entering first flow, bundle.js and 0.js are fetched.
For the second flow bundle.js, 0.js, 1.js are fetched.
For the second flow bundle.js, 0.js, 1.js and 2.js are fetched.
The flows are independent, and the order doesn't matter: the flow that is the last one on routes.js will always fetch all the chunks.

Related Links

SBT: Unable to resolved dependencies for date range picker
Webpack & Css-loader. How to create dynamic className for React?
react-konva Text - onClick does not work on mobile
list.map not being displayed in React Component
Why is “flex”-Property not working any more in react-native?
Unexpected token with Webpack and React
when use redux, can I call api in container component?
Avoid navigation in react.js on button click
React Native 0.43 upgrade: react#16.0.0-alpha.6 does not satisfy its siblings
Synchronous callback for require.ensure in Webpack 2
Test a create-react-app index.js file
Redirect after submit success redux-form
redux-promise: Uncaught TypeError: middleware is not a function
Have child of react component know the height of other child within the component
React Redux - Is there a way to wait until redux dispatch actions are finished via a promise?
Redux, store same value more than once

Categories

HOME
excel-formula
algolia
netty
fortran
packet
wifi
azure-eventhub
dynamic
jquery-plugins
watson-iot
localhost
schema
vsixmanifest
olap
hdf5
vivado-hls
spring-webflow
summernote
bug-reporting
google-drive-android-api
ng-tags-input
android-xml
suitescript
inspec
jms-topic
vtd-xml
visual-studio-debugging
keil
imdb
headphones
cocoa-scripting
cache-control
anypoint-studio
origami
byobu
directadmin
definition
peerjs
amazon-rds-aurora
firefox-developer-edition
encoder
hierarchical-clustering
jsfl
nao-robot
node-java
jenkins-docker
aws-rds
r-commander
programming-pearls
firebase-polymer
patching
vitamio
hotkeys
sbt-proguard
sqlxml
nugetgallery
containstable
google-app-engine-php
cascading
gulp-cdnizer
play-json
taverna
exchange-server-2007
textblob
dpkt
avrcp
clearquest
teamwork
tinymce-plugins
stderr
method-overloading
redmine-plugins
switchpreference
pidgin
elixir-framework
html5-filesystem
flask-mongoengine
.net-reflector
mdp
raddatepicker
backbone-views
symbian3
http-compression
ftpwebrequest
mmo
system.transactions
report-viewer2010
jquery-ui-map
systrace
datasheet
mysql-connector
datejs
response-time
focus-stealing
file-icons
expander
httpbrowsercapabilities
moores-law
stackless
scalable
memory-consumption

Resources

Encrypt Message