Home

Issue: 2202

Component data's function called twice

[issue link]

Hello all.

Can you help me please ? The data function is called twice when I refresh the page.

Thanks

package.json

"nuxt": "^1.0.0-rc11",

file index.vue

import Functions from '~/utils/Functions'

  export default {
    name: 'Testing',
    components: {},
    data: () => {
      return {
        test: Functions.test()
      }
    },
    methods: {},
    mounted () {}
  }

file ~/utils/Functions.js

test () {
  console.error('in data function')
}

Browser
screenshot from 2017-11-23 08-29-14

This question is available on Nuxt.js community (#c1943)