title: Accessing data in created from props Vue.js
body: <p>I am not able to access data from props in created function.
  Its working fine in methods as you can see in below code. </p>
  
  <p><a href="https://i.stack.imgur.com/hTAqC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hTAqC.png" alt="enter image description here"></a></p>
  
  <p>And its working in methods as you see below </p>
  
  <p><a href="https://i.stack.imgur.com/FKlqR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FKlqR.png" alt="enter image description here"></a></p>
  
  <pre class="lang-js prettyprint-override"><code>export default {
      props: ['projectId'],
      data() {
          return {
              elements: []
          }
      },
      created() {
          axios.get(`api/projects/${this.projectId}/elements`).then(response =&gt; {
             this.elements = response.data.data
          });
      },
      methods: {
          addingElement(element) {
              alert(this.projectId);
          }
      }
  }
  </code></pre>
  
  <p></p>
  
  <p>Parent template</p>
  
  <pre><code>&lt;add-project-element :projectId="project.id"&gt;&lt;/add-project-element&gt;
  </code></pre>
  
  <p>Thanks </p>