score:2

Accepted answer
this.state = {
   users: this.props.users
}

score:1

componentDidUpdate(prevProps) {
  if (this.props.users !== prevProps.users) {
    this.setState({ users: this.props.users });
  }
};

Related Query

More Query from same tag