why does mytrip send multiple requests when i call only once?

After many hours of searching, I found out that the key that is assigned to the Component caused the problem.

When the key is modified the GET request will send again. This the reason why it sends twice. Special thanks to @Anatoly for giving me the hint.

Below is the usage codes:

    <Component :key="componentKey" @edit="dataIsChanged"/>

export default {
    components: { Component },

    data: () => ({
        componentKey: 0,
    methods: {
        dataIsChanged: function() {
            this.componentKey = Math.random();

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top