I am trying to store a value using setState, however I am setting the state and in next line I am trying to console.log it, I am not able to see the value in the console.
getInitialState: function(){
return{
myCountry: ""
}
}
var country = event.target.value;
this.setState({"myCountry": country});
console.log(this.state.myCountry); //prints nothing
console.log(event.target.value);
When I surfed for this I saw that setState is asynchronous, but I am not able to understand.