This file contains hidden or 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 reducer_3 = function (action, state = {}) { | |
console.log('reducer_3 was called with state', state, 'and action', action); | |
switch (action.type) { | |
case 'SAY_SOMETHING': | |
return { | |
...state, | |
message: action.value | |
} | |
default: | |
return state; |
This file contains hidden or 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
$( "a" ).click(function( event ) { | |
event.preventDefault(); | |
$( "<div>" ) | |
.append( "default " + event.type + " prevented" ) | |
.appendTo( "#log" ); | |
}); |
This file contains hidden or 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 names = ["Lex", "World", "Medium"]; | |
var greetings = []; | |
for(var i = 0; i < names.length; i++) { | |
var sayHi = "Hello " + names[i]; | |
greetings.push(sayHi); | |
}; | |
console.log(greetings) |
This file contains hidden or 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 React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var Append = React.createClass({ | |
getInitialState: function() { | |
return { | |
logs: [] | |
}; | |
}, | |
This file contains hidden or 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
//tutorial | |
getBio(username){ | |
username = username.toLowerCase().trim(); | |
var url = `https://api.github.com/users/${username}`; | |
return fetch(url).then((res) => res.json()) | |
} | |
getBio(username) { | |
username = username.toLowerCase().trim(); | |
var url = `http://api.github.com/users/${username}`; |
This file contains hidden or 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 React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var update = require('react-addons-update'); | |
var MainForm = React.createClass({ | |
getInitialState: function () { | |
return { | |
clicked: false, | |
formData: [], | |
editMode: false |
This file contains hidden or 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
export default class Root { | |
bind(...methods) { | |
methods.forEach((method) => { | |
this(method) = this(method).bind(this) | |
}) | |
} | |
} |
This file contains hidden or 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 {formatLyric} from '../utils/format.js'; | |
const AppStoreSetter = { | |
selected: "", | |
tweetText: "", | |
templateText: "", | |
clicked: false, | |
setTweetText(lyric) { | |
let templateTextLyric = lyric; |
This file contains hidden or 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 button from '../../css/styles/Button.css' | |
export default class FirstAnswers extends React.Component { | |
render() { | |
return ( | |
<button | |
className={button.answerButton}> woo {this.props.answer}</button> | |
) | |
} | |
} |