score:3

Accepted answer

if youre trying to change the categoryList state with your incoming data you need to change your set state to

this.setState({
  categoryList: data,
});

what youre currently doing is adding a state with key data (even though there is no data key in your getInitialState function). and since youre not using this.state.data anywhere, nothing is changing, and so your ui does not appear to be updating


Related Query

More Query from same tag