Why does lodash debounce in vue?

import _ from 'lodash'
...

created: function() {
 _.debounce(function() {
console.log('test222');
 }, 500);
},
methods: {
 test: function() {
 _.debounce(function() {
console.log('test222');
 }, 500);
}
}


What am I doing wrong? This code does not work. Exactly. However, other methods, such as _.capitalize work.
June 5th 19 at 21:50
1 answer
June 5th 19 at 21:52
test: function() {
 _.debounce(function() {
console.log('test222');
 }, 500);
}

Maybe he had in mind
test: _.debounce(function() {
console.log('test222');
}, 500)

Find more questions by tags Vue.js