typeerror 3a json stringify 28 29 then is not a function

Solutions on MaxInterview for typeerror 3a json stringify 28 29 then is not a function by the best coders in the world

showing results for - "typeerror 3a json stringify 28 29 then is not a function"
Juan Esteban
03 Sep 2018
1fetch('http://localhost:5000/', {
2    method : 'post',
3    headers :{ 'Content-Type' : 'application/json'},
4    body : JSON.stringify({
5         userId : this.state.userId,
6         password : this.state.password
7   })
8}).then(response => response.json())
9  .then(data => {
10    if(data === 'success'){
11            this.props.onRouteChange('home');
12    }
13})
14