From 5385752008f4db1776161775c6b7acea0745f7a1 Mon Sep 17 00:00:00 2001 From: zhenizhui Date: Sun, 28 May 2017 20:37:20 +0800 Subject: [PATCH 1/2] ignore .idea --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 3557f05..beab98a 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,6 @@ jspm_packages .node_repl_history .DS_Store + +# webStorm config file +.idea \ No newline at end of file From a6c7b98d6ec211ecfe99bd7fad04669b677b86ec Mon Sep 17 00:00:00 2001 From: zhenizhui Date: Sun, 28 May 2017 20:45:38 +0800 Subject: [PATCH 2/2] fix 'prop-types' warning --- chapter-02/controlpanel_with_summary/package.json | 3 ++- chapter-02/controlpanel_with_summary/src/Counter.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/chapter-02/controlpanel_with_summary/package.json b/chapter-02/controlpanel_with_summary/package.json index 1557900..dc640c3 100644 --- a/chapter-02/controlpanel_with_summary/package.json +++ b/chapter-02/controlpanel_with_summary/package.json @@ -47,6 +47,7 @@ "whatwg-fetch": "1.0.0" }, "dependencies": { + "prop-types": "^15.5.10", "react": "^15.4.1", "react-dom": "^15.4.1" }, @@ -79,4 +80,4 @@ "eslintConfig": { "extends": "react-app" } -} \ No newline at end of file +} diff --git a/chapter-02/controlpanel_with_summary/src/Counter.js b/chapter-02/controlpanel_with_summary/src/Counter.js index 63726fa..b782a75 100644 --- a/chapter-02/controlpanel_with_summary/src/Counter.js +++ b/chapter-02/controlpanel_with_summary/src/Counter.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; const buttonStyle = { margin: '10px'