Y
Y
Yuri Kravchuk2018-09-05 21:02:01
Vue.js
Yuri Kravchuk, 2018-09-05 21:02:01

Why does mounted() fire more than once in Vue.js?

Either I'm doing something wrong, or I don't understand something... but my mounted() code works three times. I added receiving data via api to it and now three requests are sent simultaneously.

<template>
    <div id="app" class="container">
        <AddCampaign/>
    </div>
</template>

import AddCampaign from './components/AddCampaign';

export default {
  name: 'App',
  components: {
            AddCampaign
        },
    data() {
        return {}
    }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Reistline, 2018-09-06
@Reistline

Mounted in the AddCampaign component? We need all the code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question