[Solved] How to randomly render products after get API to obtain data in Vue? [closed]


You can set a computed property where you shuffle your products list, something like this:

computed {
  shufflesProducts() {
    return vm.products.sort(() => Math.random() - 0.5);
  }
}

solved How to randomly render products after get API to obtain data in Vue? [closed]