Skip to content

jordanpatton/react-state-management-sandbox

Repository files navigation

React State Management Sandbox

Overview

This is a simple sandbox to compare different state management strategies for building a React web application. The server exposes two strategies: RESTful JSON API and GraphQL via Apollo Server. The client implements three strategies: Redux, MobX, and GraphQL via Apollo Client. To start the server first npm install, then npm run webpack:production, and then node index.js. To view the client applications visit http://localhost:3000/dist.

By The Numbers (JavaScript)

Webpack Bundle Size (kilobytes)1 Time To Bundle (milliseconds) Unbundled User Code Size (bytes) Unbundled User Lines Of Code2
Baseline3 119 3229 3393 99
Redux4 151 3935 16287 471
MobX5 190 4235 10501 312
GraphQL6 304 5546 11102 326

1 Webpack 4.30.0 on jordanpatton/react-state-management-sandbox.

2 Calculated lines of code with find /path/to/files -type f | xargs wc -l.

3 Includes prop-types@15.7.2, react@16.8.6, react-dom@16.8.6.

4 Includes Baseline and react-redux@7.0.2, redux@4.0.1, redux-thunk@2.3.0.

5 Includes Baseline and mobx@5.9.4, mobx-react@5.4.3.

6 Includes Baseline and apollo-boost@0.3.1, graphql@14.2.1, react-apollo@2.5.4.

By The Numbers (TypeScript)

WIP

Screencast

screencast

Useful Links

About

React State Management Sandbox

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published