How to Link one page to another page in Reactjs || react router dom ||

 



import { useNavigate, Link, } from "react-router-dom";

export default function Home() {

    const navigation = useNavigate()

    return (
       
        <div className = 'div'>
         
                <ul className='ul'>
                    <li>
                        <Link to="/">Home</Link>
                    </li>
                    <li>
                        <Link to="/login">Login</Link>
                    </li>
                </ul>
   
</div>

    )
}



CSS Coding


App.css file

.ul{
  display: flex;
  flex-direction: row;
 text-indent: 20PX;
 list-style: none;
}



output:



























you see on this code on video click video link






Post a Comment

0 Comments