useCallback과 useRef를 이용한 infinite Scrolling
정리 중입니다 import React, { useEffect, useState, useCallback, useRef } from "react"; import ReactDOM from "react-dom"; import "./styles.css"; import { getMovies } from "./api"; const App = () => { const [page, setPage] = useState(1); const [movie, setMovie] = useState([]); const [loading, setLoading] = useState(false); const observer = useRef(); const lastMovieElementRef = useCallback( (e) => { if (..