page.js
wouter
Our great sponsors
page.js | wouter | |
---|---|---|
4 | 19 | |
7,665 | 6,124 | |
0.2% | - | |
0.0 | 9.4 | |
10 months ago | 5 days ago | |
JavaScript | TypeScript | |
MIT License | The Unlicense |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
page.js
-
Show HN: React Routing in 120 lines (including comments)
I've used a lot of routers and my favorite is still page.js[1]. It hasn't been updated in years. But it's small, is Express-compatible (i.e. server/client routes can use the same code), and, more importantly, is hackable. I'll never use a router tied to a certain framework again (react, nextjs, etc.) because you trade flexibility for perceived convenience (e.g. using folder structure as route structure, or React component tree as route structure). But it's a terrible trade-off that paints you into a corner later, IMO. Routing can get really niche and site-dependent, so having it fully under your control is worth it.
[1] https://github.com/visionmedia/page.js
-
Dynamic routes using vanilla HTML CSS JS?
Use a simple routing library like pages.js, but in this case I feel it might be overkill.
-
[AskJS] Are there any framework agnostic routing libraries that are well supported?
I've used Page.js for a couple of SPA projects. It was last updated a couple of years ago. The documentation isn't the best, but the client-side router does its job.
-
Building a blog with Svelte: Dynamic imports For Svelte components
We're using onMount to trigger the dynamic import when this component is first rendered. My blog uses page.js as a router, so these dynamic imports are triggered by page transitions, but the logic is the same.
wouter
-
Finally switched to Vite after CRA.
We're using wouter with great success. It's simple and effective for what we need from a router
- What is your biggest pain as a Flutter developer?
- An alternative to react router
-
Is React Router V6 over-engineered?
If you feel like React Router is a bit too over-engineered and you just need simple routing, you can have a look at https://github.com/molefrog/wouter
- Didn't realize so many others are also a bit tired of React Router. I ended up porting my app over to Wouter.
-
Switched from Next.js to Remix.js and Loving it.
I changed over to using wouter instead of react-router, and I love it!
-
Why is my Single Page App sometimes reloading the nav bar between page transitions?
Just to add alternatives. I'm a fan of Wouter its 1/10th in size compared with react-router.
-
Project without React router library
Other options than react-router are also available, like wouter, if you can't use react-router for some specific reason.
-
Is building a big project/website/app with React a mistake?
Single page just means one index.html is served and then JavaScript takes over to display content. You can use a client side router to simulate pages. There are some to choose from, I can recommend wouter. https://github.com/molefrog/wouter
-
How I got a remote job without a degree nor experience
Routing: At this point you should understand how routing in React works. You can use react-router to enhance it. There is a small library called wouter which you might want to have a look at.
What are some alternatives?
director - a tiny and isomorphic URL router for JavaScript
react-router - Declarative routing for React
crossroads - JavaScript Routes
react-router-redux
pathjs - Simple, lightweight routing for web browsers
react-breadcrumbs - Automatic breadcrumbs for React-Router
frontexpress - An Express.js-Style router for the front-end
Router5 - Flexible and powerful universal routing solution
navaid - A navigation aid (aka, router) for the browser in 850 bytes~!
react-router-component - Declarative router component for React.
SPApp - Single Page Application micro framework. Views, routes and controllers in 60 lines of code
universal-router - A simple middleware-style router for isomorphic JavaScript web apps