Method | Side effects1 | State updates2 | Example uses |
---|---|---|---|
Mounting | |||
componentWillMount |
✓ | Constructor equivalent for createClass |
|
render |
Create and return element(s) | ||
componentDidMount |
✓ | ✓ | DOM manipulations, network requests, etc. |
Updating | |||
componentWillReceiveProps |
✓ | Update state based on changed props |
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
// 1. Open the browser developper console on the network tab | |
// 2. Start the video | |
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL | |
// 4. Run: node vimeo-downloader.js "<URL>" | |
// 5. Combine the m4v and m4a files with mkvmerge | |
const fs = require('fs'); | |
const url = require('url'); | |
const https = require('https'); |
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"; | |
import {render} from "react-dom"; | |
import App from "./App"; | |
const el = document.getElementById("app"); | |
if (__DEV__) { // | |
import("react-hot-loader").then(rhl => { | |
const {AppContainer} = rhl; | |
render(<AppContainer><App /></AppContainer>, el); |
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
// Talking console | |
// | |
// Support: http://caniuse.com/#search=SpeechSynthesisUtterance | |
// | |
// Copy paste the code into dev console or | |
// use http://mrcoles.com/bookmarklet/ to create a bookmarklet. | |
/* ✂️ ......................................................................................... */ | |
if(console.log.name !== 'talkLog') { | |
console.l = console.log; |
mostly in the realm of creative coding and graphics programming
lots of these are my own :)
https://www.npmjs.org/package/wzrd (browserify dev server)
https://www.npmjs.org/package/budo (like wzrd but with incremental watching & LiveReload)
https://www.npmjs.org/package/beefy (more fully-featured dev server)