/universal-react

Try to get react app with rr4, redux, saga, ssr and code spliting

Primary LanguageJavaScriptMIT LicenseMIT

Runnning React Router v4, SSR, Redux Saga and Code Splitting together

This repository contains the code of a POC seeking to run a React application including React Router v4, Redux Saga, providing splitting code and compatible with server side rendering.

Installation

  • clone the repository
  • install the dependencies with make install

Start servers

You can start the servers with pm2 by running make start. And stop them with make stop.

Follow the POC's steps

A blog post details the implementation of this POC. You can follow the various steps by following the repository tags :

  • step-1 Bootstrap application
  • step-2 First simple code splitting
  • step-3 SSR without code splitting
  • step-4 Dynamic code splitting working client side
  • step-5 Dynamic code splitting working server side
  • step-final Final demo code with react 15 and redux saga

The master branch now uses React 16 and its feature stream for SSR (thanks to Maxime).

React Router v4, SSR, Redux Saga et Code Splitting sont dans un bateau

Ce dépot contient le code d'un POC cherchant à faire fonctionner une application React incluant React Router v4, Redux Saga, fournissant du code splitting et compatible avec du server side rendering.

Installation

  • cloner le dépôt
  • installer les dépendances avec un make install

Lancer les serveurs

Vous pouvez lancer les serveurs avec pm2 en lançant make start. Et les arrêter avec un make stop.

Suivre l'évolution du POC

Un post de blog détaille la mise en place de ce POC. Vous pouvez suivre les différentes étapes en suivant les tags du dépôt :

  • step-1 Code de l'application de départ
  • step-2 Premier code splitting
  • step-3 Mise en place du rendu serveur sans code splitting dynamique
  • step-4 code splitting dynamique côté client
  • step-5 code splitting dynamique côté serveur
  • step-final Final demo code with react 15 and redux saga

La branche master utilise maintenant React 16 et sa feature stream pour le SSR (merci à Maxime).