My blog (tonyspiro.com) built using React and the Cosmic JS content API.
This app demonstrates how to build a portfolio blog using React on the Cosmic JS content platform. Uses React Router, Flux and Cosmic JS to load pages fast in a single page application.
#####View a demo here
#####Install
git clone https://github.com/tonyspiro/tonyspiro.com-react
cd tonyspiro.com-react
npm install
#####Run webpack dev
npm run dev
Go to http://localhost:8080/webpack-dev-server #####Run production
npm start
Go to http://localhost:8000
WordPress (26.7 seconds):
React / Cosmic JS (2.3 seconds):
Benchmarking was performed by running ApacheBench. ab -n 100 -c 10 http://tonyspiro.com/
and ab -n 100 -c 10 http://tonyspiro.com:8000/
React Router is used to perform the navigation between "pages". Running npm start
boots a node server that allows for the pages to render properly when loaded in from a url or on page refresh.
The Cosmic JS browser package is used to pull the data from the Cosmic JS API into the app.
Webpack is used for the dev and build process to turn ES6 JS into browser-friendly ES5 JS using the babel-loader.
The front end style is based off a theme from Start Bootstrap.
###How I did it Here are the steps that were taken to build this app: