diff --git a/app/screens/User/components/Profile.js b/app/screens/User/components/Profile.js index 7e5c3f4..de6bedd 100644 --- a/app/screens/User/components/Profile.js +++ b/app/screens/User/components/Profile.js @@ -13,7 +13,7 @@ export default class Profile extends Component { const {username} = this.props getUserData(username) .then(({user, orgs}) => { - this.setState({user, orgs}); + this.setState(state => ({ ...state, user, orgs })); }); } diff --git a/app/screens/User/components/RepoList.js b/app/screens/User/components/RepoList.js index dff456c..9612bc5 100644 --- a/app/screens/User/components/RepoList.js +++ b/app/screens/User/components/RepoList.js @@ -11,7 +11,7 @@ export default class RepoList extends Component { getRepos() { const {username} = this.props this.props.getRepos(username).then(repos => { - this.setState({repos}); + this.setState(state => ({ ...state, repos })); }); } diff --git a/app/screens/User/index.js b/app/screens/User/index.js index 85eb2b9..753cfa8 100644 --- a/app/screens/User/index.js +++ b/app/screens/User/index.js @@ -10,7 +10,7 @@ export default class User extends Component { } handleFilterUpdate = (filter) => { - this.setState({filter}) + this.setState(state => ({ ...state, filter })) } render() {