Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
richardchen85 committed May 6, 2020
1 parent f7cbda7 commit 8e4a455
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 79 deletions.
80 changes: 40 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,51 +16,51 @@
"author": "richardchen",
"license": "MIT",
"dependencies": {
"react": "^16.8.4",
"react-dom": "^16.8.4"
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.3.4",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-decorators": "^7.4.4",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/preset-env": "^7.3.4",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.3.3",
"@types/react": "^16.9.1",
"@types/react-dom": "^16.8.5",
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.13.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.5",
"css-loader": "^3.0.0",
"eslint": "^5.16.0",
"eslint-config-react-app": "^4.0.1",
"eslint-loader": "^2.1.2",
"eslint-plugin-flowtype": "^3.4.2",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.12.4",
"eslint-plugin-react-hooks": "^1.6.1",
"file-loader": "^4.0.0",
"html-webpack-plugin": "^3.2.0",
"husky": "^3.1.0",
"less": "^3.10.2",
"less-loader": "^5.0.0",
"mini-css-extract-plugin": "^0.8.0",
"minimist": "^1.2.0",
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.6",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-decorators": "^7.8.3",
"@babel/plugin-proposal-object-rest-spread": "^7.9.6",
"@babel/preset-env": "^7.9.6",
"@babel/preset-react": "^7.9.4",
"@babel/preset-typescript": "^7.9.0",
"@types/react": "^16.9.34",
"@types/react-dom": "^16.9.7",
"@typescript-eslint/eslint-plugin": "^2.31.0",
"@typescript-eslint/parser": "^2.31.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"css-loader": "^3.5.3",
"eslint": "^6.8.0",
"eslint-config-react-app": "^5.2.1",
"eslint-loader": "^4.0.2",
"eslint-plugin-flowtype": "^4.7.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^4.0.0",
"file-loader": "^6.0.0",
"html-webpack-plugin": "^4.3.0",
"husky": "^4.2.5",
"less": "^3.11.1",
"less-loader": "^6.0.0",
"mini-css-extract-plugin": "^0.9.0",
"minimist": "^1.2.5",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"postcss-loader": "^3.0.0",
"postcss-preset-env": "^6.6.0",
"prettier": "^1.19.1",
"postcss-preset-env": "^6.7.0",
"prettier": "^2.0.5",
"pretty-quick": "^2.0.1",
"style-loader": "^1.0.0",
"terser-webpack-plugin": "^1.2.3",
"typescript": "^3.5.3",
"webpack": "^4.29.6",
"webpack-cli": "^3.2.3",
"webpack-dev-server": "^3.2.1"
"style-loader": "^1.2.1",
"terser-webpack-plugin": "^3.0.0",
"typescript": "^3.8.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3"
},
"browserslist": [
">0.2%",
Expand Down
40 changes: 1 addition & 39 deletions src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,6 @@ import React, { Component } from 'react';
import HelloTs from './HelloTs';
import styles from './App.less';

function bind(target, key, descriptor) {
let fn = descriptor.value;
let definingProperty = false;

return {
configurable: true,
get() {
if (
definingProperty ||
this === target.prototype ||
this.hasOwnProperty(key) ||
typeof fn !== 'function'
) {
return fn;
}

let boundFn = fn.bind(this);
definingProperty = true;
Object.defineProperty(this, key, {
configurable: true,
get() {
return boundFn;
},
set(value) {
fn = value;
delete this[key];
},
});
definingProperty = false;
return boundFn;
},
set(value) {
fn = value;
},
};
}

export default class App extends Component {
state = {
title: 'Webpack React Startup',
Expand All @@ -57,8 +20,7 @@ export default class App extends Component {
);
}

@bind
btnClick = e => {
btnClick = (e) => {
alert(e.target.innerText);
};
}

0 comments on commit 8e4a455

Please sign in to comment.