End of chapter 19

This commit is contained in:
Martin Donnelly 2019-09-27 11:38:25 +01:00
parent 61bd74bc69
commit 5e5ebfc6e9
4 changed files with 31 additions and 22 deletions

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EslintConfiguration">
<custom-configuration-file used="true" path="$PROJECT_DIR$/.eslintrc.json" />
</component>
</project>

View File

@ -2,7 +2,6 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="5be46653-49b7-409a-9549-21ca1be137cc" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/App.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/App.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/components/users/Search.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/users/Search.js" afterDir="false" />
</list>
@ -49,7 +48,7 @@
<property name="node.js.path.for.package.jscs" value="project" />
<property name="node.js.path.for.package.standard" value="project" />
<property name="node.js.path.for.package.tslint" value="project" />
<property name="node.js.selected.package.eslint" value="$PROJECT_DIR$/node_modules/eslint" />
<property name="node.js.selected.package.eslint" value="$USER_HOME$/.nvm/versions/node/v10.16.2/lib/node_modules/eslint" />
<property name="node.js.selected.package.jscs" value="$USER_HOME$/.nvm/versions/node/v8.1.3/lib/node_modules/jscs" />
<property name="node.js.selected.package.standard" value="$USER_HOME$/.nvm/versions/node/v8.1.3/lib/node_modules/eslint" />
<property name="node.js.selected.package.tslint" value="(autodetect)" />
@ -103,7 +102,7 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1569429914875</updated>
<workItem from="1569429916226" duration="13411000" />
<workItem from="1569429916226" duration="13704000" />
</task>
<task id="LOCAL-00001" summary="End of Chapter 14">
<created>1569512995385</created>
@ -147,7 +146,14 @@
<option name="project" value="LOCAL" />
<updated>1569579204855</updated>
</task>
<option name="localTasksCounter" value="7" />
<task id="LOCAL-00007" summary="End of chapter 19">
<created>1569580419974</created>
<option name="number" value="00007" />
<option name="presentableId" value="LOCAL-00007" />
<option name="project" value="LOCAL" />
<updated>1569580419974</updated>
</task>
<option name="localTasksCounter" value="8" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -172,6 +178,7 @@
<MESSAGE value="End of chapter 16" />
<MESSAGE value="End of chapter 17" />
<MESSAGE value="End of chapter 18" />
<option name="LAST_COMMIT_MESSAGE" value="End of chapter 18" />
<MESSAGE value="End of chapter 19" />
<option name="LAST_COMMIT_MESSAGE" value="End of chapter 19" />
</component>
</project>

View File

@ -7,14 +7,13 @@ import axios from "axios";
import "./App.css";
class App extends Component {
state = {
users: [],
loading: false
};
static propTypes = {
searchUsers: PropTypes.func.isRequired
};
constructor(props) {
super(props);
this.state = {
users: [],
loading: false
}
}
/*async componentDidMount() {
this.setState({ 'loading': true });
@ -54,4 +53,8 @@ class App extends Component {
}
}
App.propTypes = {
searchUsers: PropTypes.func.isRequired
};
export default App;

View File

@ -3,9 +3,14 @@ import React, {Component} from 'react';
class Search extends Component {
state = {
text:'martind2000'
};
constructor(props) {
super(props);
this.state = {
text:'martind2000'
}
}
onChange = e => {
this.setState({[e.target.name]: e.target.value});