React Boilerplate

High Performance React Boilerplate
R

A react boilerplate aiming to achieve best loading performance possible while also providing necessary tools needed for developing a website.

Features

So Meta

Not Now

  • async HOC to fetch asynchronous data on component load.

Size Matters

  • Minification and gzip compression for css, js, html and static files.

Quality over Quantity

  • PurgeCSS to get rid of all unused css from the bundled css files.
    • If you are using React components from node_modules, you might need to whitelist those.
  • Load js plugins in such a way that, unwanted js files are not imported in the bundled js files.
    • Using
      import Router from 'react-router/Router';
      instead of
      import { Router } from 'react-router';
      ensures that all the modules required inside index.js of react-router are not included in bundled js files.

Strength in Numbers

  • getLoadableComponent, a wrapper over React Loadable for code splitting.
    • Two priority levels for rendering loadable components in server side.
    • Add ! at the beginning of component path to defer the loading of component to client side. If there is component in page which is not needed immediately and you dont to wait until server renders it, you can defer it to client side.

Let's share the work

  • Render initial page on Server side and all consecutive pages on Client side.
    • Server side rendering supports helmet, async and loadable components seamlessly.

Other Information

  • Uses webpack for building files.
  • Uses redux for state management.
  • Uses react-router for routing.
  • Uses Immutable.js inside async HOC.
  • Utility methods get and post, both are isomorphic.
  • get caches the response unless asked to update by force.
  • Utility React Component ImmutablePureComponent.
  • Loads styles from css chunks inside style tags while rendering on server side.
  • Easy server setup using pm2.

Chandrasekhar Ambula V

AvcS

I am a software engineer with JavaScript as my major skill. I have been in field since June 2012.

I am an expert in developing Interactive and Responsive user interfaces. I have experience in developing web apps and websites from scratch.

Get in touch