page.js
navigo
Our great sponsors
page.js | navigo | |
---|---|---|
4 | 3 | |
7,665 | 2,708 | |
0.2% | - | |
0.0 | 2.3 | |
10 months ago | 9 months ago | |
JavaScript | TypeScript | |
MIT License | MIT License |
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.
navigo
-
[AskJS] Are there any framework agnostic routing libraries that are well supported?
I have used Navigo before in a vanilla SPA
-
Concrete reasons why one would choose java over node.js?
I write my logic in plain vanilla JS. Although I usually throw in JQuery because it makes the code a little smaller. If I'm writing an SPA, which is pretty much always for admin portals, I throw in navigo. I load libraries from CDNs.
-
Building a Glimmer Router with Navigo
Navigo is a simple dependency-free minimalistic JavaScript router with a fallback for older browsers. It is based on History API so it does update the URL of the page. It has got a simple mapping of route to a function call, parameterized routes, programmatic navigation between routes and lifecycle hooks such as before, after, leave, already. It can be easily integrated with HTML links via data-navigo attribute.
What are some alternatives?
director - a tiny and isomorphic URL router for JavaScript
ui-router - The de-facto solution to flexible routing with nested views in AngularJS
crossroads - JavaScript Routes
ea-async - EA Async implements async-await methods in the JVM.
pathjs - Simple, lightweight routing for web browsers
redux-first-history - Redux history binding support react-router - @reach/router - wouter - react-location
frontexpress - An Express.js-Style router for the front-end
exalt-router - A simple client side router for exalt apps
navaid - A navigation aid (aka, router) for the browser in 850 bytes~!
glimmer-routing-navigo - Glimmer routing using Navigo
SPApp - Single Page Application micro framework. Views, routes and controllers in 60 lines of code
exalt - A JavaScript framework for building universal apps.