This is now an actual repo:
/* | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
-
Shortened URL for this gist: https://git.io/v68XM
-
GitHub repository: ES6 in Motion
-
Arrow Functions
const compose = (...fns) => fns.reduce((f, g) => (...args) => f(g(...args))) | |
// Usage : compose functions right to left | |
// compose(minus8, add10, multiply10)(4) === 42 | |
// | |
// The resulting function can accept as many arguments as the first function does | |
// compose(add2, multiply)(4, 10) === 42 |
Moved to https://github.com/ebidel/puppeteer-examples |