Closed Rananjaya closed 1 year ago
Hi, I'm using GiphyAPI for my react native app. because i use expo for app. normally gif Loding is getting so much time in current implementation. is there any way to reduce the size or quality of the gif. Thanks
const getGifs = () => { let url = 'http://api.giphy.com/v1/gifs/trending?api_key=#'; if (searchTerm && searchTerm !== '') { url = http://api.giphy.com/v1/gifs/search?q=${searchTerm}&api_key=#; } else { url = 'http://api.giphy.com/v1/gifs/trending?api_key=#'; } console.warn(url); axios.get(url) .then((gif) => { const gifsObject = gif.data.data;
http://api.giphy.com/v1/gifs/search?q=${searchTerm}&api_key=#
delete gifsObject.meta; delete gifsObject.pagination; const gifArray = Object.values(gifsObject); setgifs(gifArray); }) .then( () => renderGifs(), ) .catch(error => console.log(error));
};
found the solution.
Hi, I'm using GiphyAPI for my react native app. because i use expo for app. normally gif Loding is getting so much time in current implementation. is there any way to reduce the size or quality of the gif. Thanks
const getGifs = () => { let url = 'http://api.giphy.com/v1/gifs/trending?api_key=#'; if (searchTerm && searchTerm !== '') { url =
http://api.giphy.com/v1/gifs/search?q=${searchTerm}&api_key=#
; } else { url = 'http://api.giphy.com/v1/gifs/trending?api_key=#'; } console.warn(url); axios.get(url) .then((gif) => { const gifsObject = gif.data.data;};