title: React + Redux , error updating state using axios
body: <p>I am using React JS with Redux, I am trying to fetch data from API but encountered two error.</p>
  
  <p><strong>ACTION CREATOR:</strong>
  The below code supposed to get API data and return it. <strong>I don't know how to return fetched data</strong></p>
  
  <pre><code>import axios from 'axios';
  const fetchlist = (id)=&gt;{    
      const post = axios.get(`https://jsonplaceholder.typicode.com/posts/${id}`).then(response=&gt;response.data)
  
      return{
  
          type:'FETCH',
          payload:post.data
      }
  }
  
  export default fetchlist
  </code></pre>
  
  <p><strong>REDUCER</strong> FUNCTION
  the below code is to update the <code>post</code> state but gets <strong>error</strong> <code>Block is redundant  no-lone-blocks</code></p>
  
  <pre><code>const post=(state={post:{}},action)=&gt;{
  switch(action.type){
      case 'FETCH':{    // ERROR OCCURES IN THIS LINE
          return { post:action.payload}
      };
      default: return state
  }}
  
  export default post
  </code></pre>