Why is value in console log not showing in ReactJS

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() {
    this.handleSubmit = this.handleSubmit.bind(this);
        this.state = {
 handleSubmit(event) {

render() {

        <div >
        <RaisedButton label="Save" onClick={this.handleSubmit}/>

Not only state values but whatever values I gave its not displaying. What will be the issue be? Please help

1 answer

  • answered 2018-11-08 07:13 Subin T

    I got the answer. It was a small error, I gave

    console.log("Message" +this.state.msg);

    changed coma to plus.