Awesome resources to keep learning from
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
//This is my json array | |
const myArray = [data1, data2, data3, data4, data5]; | |
console.log("seraphine testing ", [myArray[0] + 1]); | |
class App extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
articleIndex: 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
class App extends Component { | |
componentDidMount() { | |
Promise.all([fetch('URL_1_HERE'), fetch('URL_2_HERE')]) | |
.then((articles) => { | |
this.setState({ | |
articles: articles | |
}) | |
}) | |
} |
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, { Component } from "react"; | |
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | |
import "./ranking.css"; | |
class Ranking extends Component { | |
// | |
render() { | |
console.log(this.props.articles); |
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, { Component } from 'react' | |
import Search from './Search.js' | |
import SearchResults from './SearchResults.js' | |
import NewBooking from './NewBooking.js' | |
export default class Bookings extends Component { | |
constructor (props) { | |
super(props) | |
this.state = { | |
searchVal: '', |
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
# Make sure you've got the latest as-coffee-base and master branches | |
$ git fetch | |
# Get set up with the branch you want to decaffeinate | |
$ git checkout <MY-BRANCH> | |
# Rebase it, so it's branched from the changes just before decaffeinating | |
$ git rebase origin/as-coffee-base | |
# Run the decaffeination on your branch. You need to be on a version of npm with `npx` available, which I think is default from at least Node 8 onwards. I did this on node 8.4.0 installed via nvm. I think you also need prettier installed in advance. | |
$ npm install -g prettier prettier-eslint | |
# The script also requires `zsh` to run, which can be installed via brew or apt. | |
$ ./decaffeinate.sh |
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 foo(arg1, arg2, arg3) { | |
if (arguments.length === 2) { | |
arg3 = arg2 | |
} | |
console.log('arg1', arg1) | |
console.log('arg2', arg2) | |
console.log('arg3', arg3) | |
} | |
undefined | |
> foo(1, 2, 3) |
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
"use strict"; | |
module.exports = { | |
extends: [ | |
"eslint:recommended", | |
"prettier" | |
], | |
rules: { | |
"arrow-parens": "error", | |
"brace-style": ["error", "1tbs", { "allowSingleLine": false }], |
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(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) { | |
/******/ return installedModules[moduleId].exports; |