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
Build sizes for a MODIFIED version of https://github.com/facebook/react/pull/15877 that aliases `Error` to a minifiable identifier. | |
┌───────────────────────────────────────────────────────────────────────┬───────────┬──────────────┬──────┬───────────┬──────────────┬──────┐ | |
│ Bundle │ Prev Size │ Current Size │ Diff │ Prev Gzip │ Current Gzip │ Diff │ | |
├───────────────────────────────────────────────────────────────────────┼───────────┼──────────────┼──────┼───────────┼──────────────┼──────┤ | |
│ react.development.js (UMD_DEV) │ 0 B │ 110.36 KB │ n/a │ 0 B │ 27.88 KB │ n/a │ | |
├───────────────────────────────────────────────────────────────────────┼───────────┼──────────────┼──────┼───────────┼──────────────┼──────┤ | |
│ react.production.min.js (UMD_PROD) │ 0 B │ 12.32 KB │ n/a │ 0 B │ 4.8 KB │ n/a │ | |
├────────────────────────────────────── |
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
const result = Animated.modulo( | |
Animated.add(phase, Math.PI * 2 + angle), | |
Math.PI * 2 | |
); |
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
// Work in progress | |
// Babel plugin to convert Node-style callback code to async/await | |
export default function(babel) { | |
const { types: t } = babel; | |
const asyncControlFlowVisitor = { | |
CallExpression(path) { | |
const callee = path.get("callee"); | |
if ( |
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
Show hidden characters
{ | |
"plugins": [ | |
"transform-es3-property-literals", | |
"transform-es2015-modules-commonjs", | |
"transform-es2015-classes", | |
] | |
} |
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
{ | |
"name": "dummy", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"scripts": { | |
"build": "babel src -d dist", | |
"test": "node dist/a", | |
"test-cov": "cross-env BABEL_ENV=test npm run build && nyc --all node dist/a && nyc report --reporter html" | |
}, |
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
{ | |
"presets": ["es2015"], | |
"plugins": ["transform-runtime"] | |
} |
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 methodGroups fom './method-groups-decorator'; | |
@methodGroups('lifecycle') | |
class Example extends React.Component { | |
static lifecycle = { | |
componentWillMount() {}, | |
componentDidMount() {}, | |
componentWillReceiveProps() {}, | |
shouldComponentUpdate() {}, | |
componentWillUpdate() {}, |