The godliest of routers!
✨ Demo
OR SANDBOX IT
https://codesandbox.io/s/fc-hash-router-example-3z0bf
yarn add fc-hash-router -D
import { HashRouter } from "fc-hash-router";
HashRouter.route(`products/:firstVar/:someVar/bobby/#num/random`, (data) => {
console.info(data);
});
// Or cooler
HashRouter.route(`products/:firstVar/:someVar/bobby/#num/random`, ({firstVar,someVar,num}) => {
console.info({firstVar,someVar,num});
});
<a href="#/products/12/22/bobby/123/random">TEST</a>
HashRouter.navigate(`/products/12/22/bobby/123/random`);
HashRouter.routeOff(`new/#userId`);
THAT EASY!
👤 Angel Grablev
- Website: https://freedcamp.com
- Github: @agrublev
Give a ⭐️ if this project helped you!
Made by Freedcamp with ❤️