title: Showing warning for filter method in React js
body: <p>I am getting a warning as <strong>Expected to return a value at the end of arrow function  array-callback-return</strong></p>
  
  <p>i am deleting an selected post using axios and json server , after deleting each post i am just returning the new array </p>
  
  <pre><code>.then(() =&gt; {
          const remainingPosts = this.props.posts.filter((post) =&gt; {
            if (post.id !== this.state.loadedPost.id) {
              return post
            }
          })
  </code></pre>
  
  <p>if i comment out the if condition i  am not getting the warning , else i am getting the warning </p>