[Vue warn]: Error in callback for watcher “value“ (How to Solve)

1. Full text description of error:

[Vue warn]: Error in callback for watcher “value”: “TypeError: Cannot read properties of undefined (reading ‘value’)

2. The problem point is the error reported when assigning a value to the secondary attribute of data

3. Reasons:

Assign a value directly to the method just opened on the page. The console will report the above error for the first time, but not for the second time. It is mainly to solve the problem of reporting an error for the first time

this.formData.recognitionResourceIndexCodes.push('Some value');

4. The solution is to use the omnipotent $nexttick

this.$nextTick(() => {
    this.formData.recognitionResourceIndexCodes.push('Some value');
});

Read More: