목록query (1)
코딩쌀롱

console.dir(location)해봤을 때. - location.pathname: 요청한 url의 path값 - match.path: 정의한 라우트의 path값 - match.isExact: 요청한 path와 정의한 라우트의 path가 같은지 - location.search: 쿼리 스트링 window.location.search를 queryString.parse에 전달해주면 객체로 만들어준다. location.search하니까 리액트+타입스크립트에서 에러가 나서 window.을 붙여줬더니 해결됐다. import queryString from "query-string"; const MyPageModal = ({ onClick }: Props) => { const query = queryString.p..
회고/하루 기록
2021. 5. 30. 03:50