[Vuejs]-GIPHY API returns the same results everytime

3👍

GIPHY will return the same GIF object every time for the same query string using the Search Endpoint. If you want to randomize the results, that will be your job.

A possible solution is to create another array, extract random array entries from your gifsArray and push those entries to the new array and then return that array instead.

One alternative solution would be to use the Random Endpoint api.giphy.com/v1/gifs/random. This will work if you are fine with a single random GIF, as it returns a single random GIF.

Leave a comment