Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

210
Views
What's the difference between creating the Vue instance properties inside and outside the export default?

So in Vuejs, what is the difference between the two below?

  1. Is it more advisable to do the first one?
  2. Is it advisable to use the second one for other properties (methods, computed, watch, etc)?
  3. What are the effects of using the second one for creating the properties?

Thank you for any input!

<template>
</template>

<script>

export default {
    data() {
      return {
      .........
      }
    },

</script>

<script>

let data = {
    .....
}

export default {
  data() {
    return data
  },
      
 </script>

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!