Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

201
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!