[React.js] 리액트의 네트워크 상태 관리 훅, SWR
SWR 네트워크 상태 관리 툴 React hooks for Data Fetching made by vercel stale-while-revalidate SWR is a strategy to first return the data from cache (stale), then send the fetch request (revalidate), and finally come with the up-to-date data. 빠르게 화면에 보이는 캐시된 데이터를 제공하고, 동시에 백그라운드에서 데이터를 다시 가져와서 UI를 새로 고치는 방식 SWR에서 "캐시"는 메모리 내에 저장된 데이터의 일시적인 복사본을 의미한다 사용자 경험을 향상시키고, 데이터의 최신 상태를 유지 가능 const { data, isLoading..
2024.01.16