useLocation1 useLocation 1. 소개 useLocation은 React Router에서 제공하는 hook으로 현재 페이지의 URL 정보를 가져올 때 많이 쓰인다. useLocation v6.22.0 | React Router useLocation Type declarationdeclare function useLocation(): Location; interface Location extends Path { state: State; key: string; } interface Path { pathname: string; search: string; hash: string; } This hook returns the current location object. This can reactrouter.com 2. 꿀팁 import * .. 2024. 2. 7. 이전 1 다음