DEV Community

Chuazz
Chuazz

Posted on

How to update array element in Vue3 Composition API

I have trouble while update a specific element in a array, this is my code

Image description

then i get a message like this: "Invalid left-hand side in assignment expression".

Top comments (2)

Collapse
 
jonrandy profile image
Jon Randy πŸŽ–οΈ

You are trying to assign values to values, you can't do that. This is a JS mistake - nothing to do with Vue.

Replace ?. with .

Collapse
 
chuazz profile image
Chuazz

thank you so much😘