<Link>


<a>


useNavigate

import {useNavigate} from 'react-router-dom';
const Main = () => {
	const navigate = useNavigate();
	...
	return (
		<button onClick={() => {navigate("/about")}}>about</button>
	)
}
import React from 'react'
import { useLocation, useNavigate } from 'react-router-dom';

function PostDetail() {
  const location = useLocation();
  const navigate = useNavigate();
  const { post } = location.state ? location.state : { post:'' }

  if (!post) return <p>Not Found</p>return (
    <div>
        { post.title }
        { post.body }
        <button 
					onClick={() => navigate("/users", 
						{replace: true, state: {data: 1}}
					)}
				>
				유저페이지로 이동
				</button>
    </div>
  )
}
export default PostDetail