1
I’m picking up at the time of using list in Vue. I display on the screen a list reversed by a computed. I need to display it upside down so when I add an item it shows up on top. Only the way I did Vue is lost when removing the correct item from the list.
See my code: https://jsbin.com/jutuyenubi/edit?html,js,console,output
I made a button to add, which works properly. Already in "remove" I use the index of the item in the list to make a splice(), only Vue uses this index in the inverted list, I imagined that it would use in the original list and then invert.
Thanks man, solved my problem.
– Felipe Coelho
Face your answer works, but is as Sergio commented, gives problem with immutable objects. I started having problems that were solved using Sergio’s solution.
– Felipe Coelho