title: How to display the responded message at the left handside and replied messages at the right hand side by fetching using reactjs
body: <p>I'm new to reactjs.</p>
  
  <p>I want to display the reponded message at the left hand side if the condition "<strong><em>isrespond: true</em></strong>" otherwise the message need to get displayed at the right hand side (like a list of messages need to display only. I don't know how to write the condition for it.</p>
  
  <pre><code> componentDidMount() {
      fetch('api/messagelist')
      .then(res =&gt; res.json())
      .then((data) =&gt; {
        this.setState({ message: data })
      })
      .catch(console.log)
    }
  
  </code></pre>
  
  <p>this would be jsondata in api: </p>
  
  <pre><code>{
  "message": "Hello everyone",
      "isrespond": true,
  },
  
  {
  "message": "hi",
      "isrespond": false,
  
  }
  
  </code></pre>
  
  <p>Can anyone help me with this?</p>