Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

203
Visualizações
Giphy React Grid component is not working

I am trying to replicate the search and masonry grid from the official documentation using their Codesandbox example.

However, when I am trying to use it, the code is not returning any gifs back.

I have verified that the JS fetch is indeed returning back gifs, it seems that the grid is not calling the fetchGifs function.

I am hitting the same issue with Carousel component as well.

Can anyone help me with this issue?

Codesandbox link for my implementation - https://codesandbox.io/s/cocky-waterfall-ny9rzk Component i was trying to use - Search and Grid from https://github.com/Giphy/giphy-js/tree/master/packages/react-components

import { GiphyFetch } from "@giphy/js-fetch-api";
import { Grid } from "@giphy/react-components";
import useDebounce from "react-use/lib/useDebounce";
import React, { useState } from "react";

export default function App() {
  const giphyFetch = new GiphyFetch("PZpYG85wQpugMlEx02GGqeKfKZ8eMdFZ");
  const [debouncedInput, setDebouncedInput] = useState<string>("");
  const [term, setTerm] = useState<string>("");
  useDebounce(() => setTerm(debouncedInput), 500, [debouncedInput]);

  const NoResults = <div className="no-results">No Results for {term}</div>;

  const fetchGifs = (offset: number) => {
    return giphyFetch.search(term, { offset, limit: 10 });
  };
  return (
    <div className="App">
      <h1>Hello CodeSandbox</h1>
      <input
        placeholder="type to search"
        onChange={({ target: { value } }) => setDebouncedInput(value)}
        value={debouncedInput}
      />
      <Grid
        key={term}
        columns={3}
        gutter={6}
        noResultsMessage={NoResults}
        width={400}
        fetchGifs={fetchGifs}
      />
    </div>
  );
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda