Instead of calling the API every time the component re-render, call the API once when the website is loaded and get 25 gifs of each anime, and then randomly select from that array.
API is to be called in App.jsx ( so that it is called only once ) and then the arrays are to be filled for all the 10 animes, no need to pass them as they are available in constants.js and can be imported directly.
Instead of calling the API every time the component re-render, call the API once when the website is loaded and get 25 gifs of each anime, and then randomly select from that array.
API is to be called in App.jsx ( so that it is called only once ) and then the arrays are to be filled for all the 10 animes, no need to pass them as they are available in constants.js and can be imported directly.