A Pen by Svetlana Linuxenko on CodePen.
A Pen by Svetlana Linuxenko on CodePen.
A Pen by Svetlana Linuxenko on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { connect } from 'react-redux'; | |
import { Component } from 'react'; | |
class SandwichShop extends Component { | |
componentDidMount() { | |
this.props.dispatch( | |
makeASandwichWithSecretSauce(this.props.forPerson) | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var sys = require('sys'); | |
var oauth = require('oauth'); | |
var app = express.createServer(); | |
var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY"; | |
var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET"; | |
function consumer() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://cpv2api.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import weatherApp from '../reducers/' | |
import { createStore, applyMiddleware } from 'redux' | |
import thunkMiddleware from 'redux-thunk' | |
import createLogger from 'redux-logger' | |
const loggerMiddleware = createLogger() | |
const createStoreWithMiddleware = applyMiddleware( | |
thunkMiddleware, // lets us dispatch() functions | |
loggerMiddleware // neat middleware that logs actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function run (generator) { | |
var data = null, yielded = false | |
var iterator = generator(function () { | |
data = arguments | |
check() | |
}) | |
yielded = !!(iterator.next()) | |
check() | |
function check () { | |
while (data && yielded) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const logger = createLogger(); | |
const store = createStore( | |
combineReducers({ | |
items, | |
filter | |
}), | |
window.devToolsExtension ? window.devToolsExtension() : f => f, | |
applyMiddleware(logger) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true | |
}, | |
"plugins": ["react"], | |
"ecmaFeatures": { |