marshrut
v1.0.4
Published
### This tool is for educational purpose.
Downloads
5
Readme
This routing tool created by Javid Salimov
This tool is for educational purpose.
You can use this for own projects
This is for my students to learn how to use routing.
(WEB 2 Group 2024 ASOIU from Code For Future)
import { Router } from 'marshrut/dist/marshrut.es';
function App() {
return (
<>
<Navbar />
<Router path="/" component={Home} />
<Router path="/about" component={About} />
<Router path="/contacts" component={Contact} />
</>
);
}
export default App
and for navigation
import { Link } from "marshrut/dist/marshrut.es";
const Navbar = () => {
return (
<nav>
<ul>
<li>
<Link to="/">Home</Link>
</li>
<li>
<Link to="/about">About</Link>
</li>
<li>
<Link to="/contacts">Contacts</Link>
</li>
</ul>
</nav>
);
};
export default Navbar;