One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
// fake reselect | |
const createSelector = (deps, body) => (state, props) => | |
body(...deps.map(dep => dep(state, props))); | |
const createStructuredSelector = scheme => (state, props) => | |
Object.keys(scheme).reduce((result, key) => ({ | |
...result, | |
[key]: scheme[key](state, props) | |
}), {}); |
// Import functions | |
import { createStore } from 'redux'; | |
import { createAction, createReducer } from 'redux-act'; | |
// Create an action creator (description is optional) | |
const add = createAction('add some stuff'); | |
const increment = createAction('increment the state'); | |
const decrement = createAction('decrement the state'); | |
// Create a reducer |
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
// It is important to declare your variables. | |
(function() { | |
var foo = 'Hello, world!'; | |
print(foo); //=> Hello, world! | |
})(); | |
// Because if you don't, the become global variables. | |
(function() { |