Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SPA with React Router 4, code splitting with React Loadable

License

NotificationsYou must be signed in to change notification settings

jamesfiltness/universal-react-router-4-redux-boilerplate-with-code-splitting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This boilerplate demonstrates a minimal universal React/Redux/React Router 4 single page app, with code splitting. It uses React Loadable to make working with Dynamic imports easy and work with universal rendering.

Runnpm i followed bynpm start to get the app running atlocalhost:3000. Check the network tab to see bundles being pulled in on demand.

The gist of it is that we use React Loadable to collect all of the bundles it uses for the server render and send those down to the client in script tags:

https://github.com/jamesfiltness/universal-react-router-4-redux-boilerplate-with-code-splitting/blob/master/src/server/middleware/react-router/index.js

and then pick those up on the client using React Loadable again:

https://github.com/jamesfiltness/universal-react-router-4-redux-boilerplate-with-code-splitting/blob/master/src/server/index.jshttps://github.com/jamesfiltness/universal-react-router-4-redux-boilerplate-with-code-splitting/blob/master/src/client/index.js

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp