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
{ | |
"name": "npm-scripts-example", | |
"version": "1.0.0", | |
"description": "npm scripts example", | |
"scripts": { | |
"build": "node build.js" | |
} | |
} |
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
cat bigFile.txt | grep 'Cory House' > linesThatHaveMyName.txt |
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 React from 'react'; | |
class HelloWorld extends React.Component { | |
constructor(props) { | |
super(props); | |
} | |
sayHi(event) { | |
alert(`Hi ${this.props.name}`); | |
} |
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 React from 'react'; | |
const HelloWorld = (props) => { | |
const sayHi = (event) => { | |
alert(`Hi ${props.name}`); | |
}; | |
return ( | |
<div> | |
<a href="#" onClick={sayHi}>Say Hi</a> |
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 React from ‘react’; | |
const HelloWorld = ({name}) => ( | |
<div>{`Hi ${name}`}</div> | |
); | |
export default HelloWorld; |
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
{ | |
"name": "ps-redux", | |
"version": "1.0.0", | |
"description": "Starter kit for React and Redux Pluralsight course by Cory House", | |
"scripts": {}, | |
"author": "Cory House", | |
"license": "MIT", | |
"dependencies": { | |
"babel-polyfill": "6.8.0", | |
"bootstrap": "3.3.6", |
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
// Approach 1: Use React.createClass | |
var HelloWorld = React.createClass({ | |
getInitialState() { | |
return { message: 'Hi' }; | |
}, | |
logMessage() { | |
// this magically works because React.createClass autobinds. | |
console.log(this.state.message); | |
}, |
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
public class FuelSavingsCalculator | |
{ | |
public readonly int milesDriven; | |
public readonly FuelSavingsCalculatorTimeFrame timeframe; | |
public readonly int tradeMpg; | |
public readonly int newMpg; | |
public readonly decimal ppg; | |
public FuelSavingsCalculator(int milesDriven, FuelSavingsCalculatorTimeFrame timeframe, int tradeMpg, int newMpg, decimal ppg) | |
{ |
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
{ | |
"name": "javascript-development-environment", | |
"version": "1.0.0", | |
"description": "JavaScript development environment Pluralsight course by Cory House", | |
"scripts": { | |
}, | |
"author": "Cory House", | |
"license": "MIT", | |
"dependencies": { | |
"whatwg-fetch": "1.0.0" |
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
Show hidden characters
{ | |
"root": true, | |
"extends": [ | |
"eslint:recommended", | |
"plugin:import/errors", | |
"plugin:import/warnings" | |
], | |
"parserOptions": { | |
"ecmaVersion": 7, | |
"sourceType": "module" |