title: Fetch posts from Wordpress Api with Vuejs
body: <p>I'm trying to fetch posts title form WP API with Vuejs but console throws me an error </p>
  
  <blockquote>
    <p>Cannot read property 'rendered' of undefined"</p>
  </blockquote>
  
  <p>I don't know what is a problem. Here is posts component:</p>
  
  <pre><code>&lt;template&gt;
  
  &lt;div class="posts"&gt;
              &lt;h1&gt;Posts&lt;/h1&gt;
              &lt;ul&gt;
                  &lt;li v-for="post in posts" :key="post.id"&gt;
                       {{ post.title.rendered  }}
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  
      export default {
          mounted() {
              this.getPosts();
          },
  
          data() {
              return {
                  postsUrl: 'http://localhost:8080/wp-json/wp/v2/posts',
                  posts: [],
                  postsData: {
                      per_page: 10,
                      page: 1
                  },
  
              }
          },
          methods: {
  
              getPosts() {
                axios.get(this.postsUrl, {params: this.postsData})
                      .then((response) =&gt; {
                          this.posts = response;
                            this.configPagination(response.headers);
                      })
                      .catch( (error) =&gt; {
                          console.log(error);
                      });
              },
  
          }
      }
  &lt;/script&gt;
  </code></pre>