search in react
first use useState, useEffect and useRef hooks. Then use setTimeout and last use clean up function to clear the timer that we create using setTimeout.
import React, { useEffect, useRef, useState } from "react";
import Card from "../UI/Card";
import ...
thilina.hashnode.dev1 min read