0.0.3 • Published 2 years ago
jacinto-router v0.0.3
Basic Router for React
Basic router for your React applications
Installation
npm i jacinto-router
Getting Started
- Import the Router component from the jacinto-router package:
import { Router } from 'jacinto-router'
- Wrap your application with the Router component
import { Router } from 'jacinto-router'
import Home from './Home'
import Contact from './Contact'
function App() {
return (
<Router>
<Route path="/" component={Home} />
<Route path="/contact" component={Contact} />
</Router>
);
}
export default App;
- Use the Link component to navigate through your application
import { Link } from 'jacinto-router';
<Link to='/'>Go to Home</Link>
Link also has target prop so you can change it when u need it
import { Link } from 'jacinto-router';
<Link to='/' target='_blank'>Go to Home</Link>