Get your own Vue server Result Size: 625 x 565
App.vue
main.js
 
<template>
  <h1>Lifecycle Hook 'created' Example</h1>
  <p>Using the created lifecycle hook to change the 'text' data property.</p>
  <p>This is the earliest point in the component's lifecycle where we can access the Vue instance properties.</p>
  <p>text: <pre>'{{ text }}'</pre></p>
</template>

<script>
export default {
  data() {
    return {
      text: 'initial text'
    }
  },
  created(){
    this.text = 'The component is now created';
  }
}
</script>

<style>
pre {
  display: inline;
  background-color: lightgreen;
}
</style>                  
http://localhost:5173/