Reactjs – useEffect calling function even if input is not changed
Home.js export default function Home({ movies }) { const [searchTerm, setSearchTerm] = useState(""); const [inputChanged, setInputChanged] = useState(false); const [loading, setLoading] = useState(false); const useDelayFuctionRef = useRef(null); const router = useRouter(); const client = {id:'',pass:''} useEffect(() => { const searchQuery…