Working with Firebase 9 and Vue 3 in building a chat application. The issue at hand is that when I push message objects to the messages array [], the console shows duplicates like this:
Proxy {0: {…}, 1: {…}}
[[Handler]]: Object
[[Target]]: Array(3)
0: createdAt: ut {seconds: 1647944143, nanoseconds: 557000000}
photoURL: "https://lh3.googleusercontent.com/a-/AOh14GjGXUIFOraxHTZqGIjTLkKGgyM8w7SvVDfF0XQ4=s96-c"
sender: "Dif Az"
text: "Test"
[[Prototype]]: Object
1: createdAt: ut {seconds: 1647944149, nanoseconds: 756000000}
photoURL: "https://lh3.googleusercontent.com/a-/AOh14GjGXUIFOraxHTZqGIjTLkKGgyM8w7SvVDfF0XQ4=s96-c"
sender: "Dif Az"
text: "Halo"
[[Prototype]]: Object
2: createdAt: ut {seconds: 1647944143, nanoseconds: 557000000}
photoURL: "https://lh3.googleusercontent.com/a-/AOh14GjGXUIFOraxHTZqGIjTLkKGgyM8w7SvVDfF0XQ4=s96-c"
sender: "Dif Az"
text: "Test"
[[Prototype]]: Object
length: 3
[[Prototype]]: Array(0)
[[IsRevoked]]: false
Upon submitting new messages in the console, the array continues to duplicate as seen above with new values repeating.
Chat.vue?0d25:56 Proxy {0: {…}, 1: {…}, 2: {…}}