useHistory 사용 시 id값 담기

history.push() 안에 객체로 pathname과 state를 담을수있다.
pathname은 redirect할 endpoint를 써주고
state는 id를 담는다
history.push({ pathname:'/maker', state: { id: userId }, });
리액트 컴포넌트에서 확인 가능
value → location → state에 들어가면 있다.