1const SideBar = () =>{
2 const [activeClass, setClass] = useState('');
3
4 return (
5 <div className="sidebar">
6 <ul>
7 <li> <Link onClick={() => setClass('active')} className={activeClass} to="/"> Home </Link> </li>
8 <li> <Link to="/about"> About </Link> </li>
9 <li> <Link to="/form"> Form </Link> </li>
10 </ul>
11 </div>
12 )
13}
14