I have a react app where console.log not showing the values in it but it displays the message. eg,
class Sample extends Component {
constructor() {
super()
this.handleSubmit = this.handleSubmit.bind(this);
this.state = {
msg:"Hi"
}}
handleSubmit(event) {
console.log("Message",this.state.msg);
}
render() {
return(
<div >
<RaisedButton label="Save" onClick={this.handleSubmit}/>
</div>
);
}}
Not only state values but whatever values I gave its not displaying. What will be the issue be? Please help