page.js VS crossroad

Compare page.js vs crossroad and see what are their differences.

page.js

Micro client-side router inspired by the Express router (by visionmedia)

crossroad

🛣 A React library to handle navigation in your WebApp. Built with simple components and React Hooks so your code is cleaner. (by franciscop)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
page.js crossroad
4 5
7,665 31
0.2% -
0.0 0.0
10 months ago over 1 year ago
JavaScript JavaScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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

Posts with mentions or reviews of page.js. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-05-13.
  • Show HN: React Routing in 120 lines (including comments)
    9 projects | news.ycombinator.com | 13 May 2022
    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?
    1 project | /r/webdev | 4 Apr 2022
    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?
    4 projects | /r/javascript | 1 Sep 2021
    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
    1 project | dev.to | 17 Feb 2021
    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.

crossroad

Posts with mentions or reviews of crossroad. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-18.
  • What are your favorite, must-have packages when you're creating a project?
    5 projects | /r/reactjs | 18 Jan 2023
    https://crossroad.page/ (1.74kb) routing, similar to React Router
  • React Router 6.4 Release
    2 projects | /r/reactjs | 14 Sep 2022
    Seeing the direction React Router was taking (even before they started mixing things with data loading/management), I wrote a small alternative https://crossroad.page/ that only does routing but does it following modern React best practices:
  • Show HN: React Routing in 120 lines (including comments)
    9 projects | news.ycombinator.com | 13 May 2022
    1kb is likely a lot more than what is shown here; I made a "tiny" but very complete React Router package which is very complete and minified+gzip it's just 1.8kb https://crossroad.page/
  • Not Another Framework
    4 projects | news.ycombinator.com | 27 Jan 2022
    The author claims to "learn JS/HTML", but the first example is importing a custom component called Link with who knows what inside, which I find especially ironic because I made a small library[1] for routing in React where links are just links:

    Login

    [1] https://crossroad.page/

  • Ask HN: What are you using for public documentation these days?
    30 projects | news.ycombinator.com | 18 Nov 2021
    I have an unfinished side project called Documentation Page:

    https://documentation.page/

    It's "unfinished" because I'd need to integrate payments and do all the accounting on my side (non-trivial as an individual living in Japan), but otherwise it's worked pretty well for my own projects.

    It parses your Github Repo (according to https://documentation.page/documentation#getting-started) to generate the website. It can be a single readme.md file (for smaller projects), a folder called "documentation", or you can configure it otherwise. Some examples hosted by Documentation Page:

    - statux.dev: simple single-page docs and website, menu config in https://github.com/franciscop/statux/blob/master/documentati.... Similar to form-mate.dev & vector-graph.com

    - react-test.dev: split into multiple pages, you specify the folder and it'll automatically merge the markdown files. See config https://github.com/franciscop/react-test/blob/master/documen...

    - crossroad.page: has an landing page, but that is not officially supported (yet). See the configs in https://github.com/franciscop/crossroad/blob/master/document...

What are some alternatives?

When comparing page.js and crossroad you can also consider the following projects:

director - a tiny and isomorphic URL router for JavaScript

hookrouter - The flexible, and fast router for react that is entirely based on hooks

crossroads - JavaScript Routes

universal-router - Universal routing both for backend and frontend

pathjs - Simple, lightweight routing for web browsers

manconvert - Convert troff-style man pages to doxygen source or formatted HTML

frontexpress - An Express.js-Style router for the front-end

typesense-docsearch-scraper - A fork of Algolia's awesome DocSearch Scraper, customized to index data in Typesense (an open source alternative to Algolia)

navaid - A navigation aid (aka, router) for the browser in 850 bytes~!

one-app-router - ✨Declarative routing for One App forked from React Router 3

SPApp - Single Page Application micro framework. Views, routes and controllers in 60 lines of code

davis.js - RESTful degradable JavaScript routing using pushState