Code Splitting with React and React Router

Code Splitting with React and React Router  #reactjs #React #reactrouter

  • Code splitting has gained popularity recently for its ability to allow you to split your app into separate bundles your users can progressively load.
  • In this post we’ll take a look at not only what code splitting is and how to do it, but also how to implement it with React Router.
  • You already split your app into different routes, so adding in code splitting on top of that feels pretty natural.
  • Instead of thinking about code splitting as splitting your app up by its routes, you should think of it as splitting your app up by its components ( s are just components, after all).
  • You already know how to dynamically import modules with , now you just need to figure out which components in your app you can hold off downloading until your user needs them.

Code splitting has gained popularity recently for its ability to allow you to split your app into separate bundles your users can progressively load. In this post we’ll take a look at not only what code splitting is and how to do it, but also how to implement it with React Router.
Continue reading “Code Splitting with React and React Router”