Before getting to React, it's helpful to know what this does generally in Javascript.
Take the following snippet of code. It's written in ES6 but the principles for this
predate ES6.
class Dog {
constructor() {git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| // === Spread Operator | |
| //Ex1: | |
| Math.max(5, 6, 8, 9, 11, 999); | |
| // 999 | |
| //Ex2: | |
| const numbers = [5, 6, 8, 9, 11, 999]; | |
| Math.max(...numbers) |
| // config/passport.js | |
| // load all the things we need | |
| var LocalStrategy = require('passport-local').Strategy; | |
| var mysql = require('mysql'); | |
| var connection = mysql.createConnection({ | |
| host : 'localhost', | |
| user : 'root', |