Skip to content

Latest commit

 

History

History

react-splitAsync

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Livepack

asyncSplit() with React

A very simple example of using livepack.asyncSplit() with React to code-split an app into separate files which are lazy-loaded on demand.

Build app

npm install
npm run build

React app will be built in the build folder.

Serve app

npm start

React app will be served at http://localhost:5000.

Notes

Notice that:

  • The Person component is in a separate chunk which is loaded on demand.
  • Each person page has it's own chunk which contains the data required for that page only, again loaded on demand.