shallowroute1 Next14에서 shallowRoute 사용하기 + usePagination 구현하기 똑똑한개발자 내부 코드리뷰의 외부 공개용 재정리 파일입니다. @24.09.19 next 14 app router를 사용한 이후 shallowRoute가 없어졌다는 것을 깨달았습니다.결국 공식문서 를 참고하여 새 hooks를 구현했습니다. useShallowSearchParmas.tsimport { useSearchParams } from "next/navigation";type MethodType = "push" | "replace";export const useShallowSearchParams = ( key: string, method: MethodType = "push") => { const searchParams = useSearchParams(); const paramsValue = se.. 2024. 10. 1. 이전 1 다음