fre router
AlidotSal opened this issue · comments
Ali Sal commented
I was wondering if there is a router for fre or it works with other (react) routers?
伊撒尔 commented
https://github.com/molefrog/wouter/blob/master/use-location.js
Here is a use-location hook that can be used.
rjjrbatarao commented
im using this for the mean time https://socket.dev/npm/package/frontend-router-js
import router from "frontend-router-js";
useEffect(() => {
const routes = document.getElementById("routes");
router.get("/", (req, res) => {
render(<h1>HOME PAGE</h1>, routes);
});
router.get("/contact", (req, res) => {
render(<h1>CONTACT US</h1>, routes);
});
return () => {
}
}, [])