- The Beatles
- Rolling Stones
- The Who
- The Doors
- John Lennon
- Bob Dylan
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
const {useCallback, useEffect, useReducer, useRef} = require('react'); | |
let effectCapture = null; | |
exports.useReducerWithEmitEffect = function(reducer, initialArg, init) { | |
let updateCounter = useRef(0); | |
let wrappedReducer = useCallback(function(oldWrappedState, action) { | |
effectCapture = []; | |
try { | |
let newState = reducer(oldWrappedState.state, action.action); |
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
//////////////////////////////////////////////////////////////////////////////// | |
// Create a directory called "pages" next to | |
// this file, put markdown files in there, and | |
// then run: | |
// | |
// ``` | |
// $ node build.mjs | |
// ``` | |
// | |
// Then deploy the "build" directory somewhere. |
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 {Observable} from 'rxjs'; | |
const mediaQueries = window.matchMedia('(min-width: 400px)'); | |
const mediaQueryEvent = Observable.create((observer) => { | |
mediaQueries.addListener(e => observer.next(e)); | |
}).share(); | |
class MyComponent { |
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
// do it live: http://jsfiddle.net/apinstein/2kR2c/1/ | |
// in DOM | |
<div ng-controller="MyCtrl"> | |
<p ng-click="bumpA()">a: {{a}}</p> | |
<p ng-click="bumpB()">b: {{b}}</p> | |
<p>a^2 = {{aSquared}}</p> | |
<p>a + b = {{aPlusB}}</p> | |
</div> |
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
{ | |
"important": false, | |
"adjoining-classes": false, | |
"known-properties": false, | |
"box-sizing": false, | |
"box-model": false, | |
"overqualified-elements": false, | |
"display-property-grouping": false, | |
"bulletproof-font-face": false, | |
"compatible-vendor-prefixes": false, |