title: Can not change state of object
body: <p>I am trying to fetch a single object, and it fetches, I get correct data in response.data, but i can't set it to state. It just remains as a null object. What am I doing wrong?
  Post is a json object with several fields like: post_id, post_title, post_content and etc.</p>
  
  <pre><code>const [post, setPost] = useState({})
  
  let id = match.params.id
  
  useEffect(() =&gt; {
       axios.get(`${BASE_URL}/post?id=${id}`)
       .then(response =&gt; {
          console.log(response.data)
          setPost(response.data)
       })
       .then(() =&gt; {
              console.log("post: ", post)
          }
       )
  </code></pre>