Skip to content

Instantly share code, notes, and snippets.

@Muzietto
Created March 16, 2017 08:43
Show Gist options
  • Save Muzietto/0402f93f9c11d68ed5349e77c415f652 to your computer and use it in GitHub Desktop.
Save Muzietto/0402f93f9c11d68ed5349e77c415f652 to your computer and use it in GitHub Desktop.
npm configuration and app entry script for media library using redux-saga (https://scotch.io/tutorials/build-a-media-library-with-react-redux-and-redux-saga-part-1)
import React from 'react';
import ReactDOM from 'react-dom';
import {Router, hashHistory} from 'react-router';
import routes from './routes';
// require the routes and render to the DOM using ReactDOM API
ReactDOM.render(
<Router history={hashHistory} routes={routes} />,
document.getElementById('root')
)
{
"name": "media-saga",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "15.2.1",
"react-dom": "15.2.1",
"react-router": "2.6.0",
"react-redux": "^5.0.3",
"redux": "^3.6.0",
"redux-saga": "^0.14.3"
},
"devDependencies": {
"react-scripts": "0.9.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment