npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-complete-router

v1.5.12

Published

A extensible react router with tools to help you in any case you need

Downloads

4

Readme

react-complete-router

Tired of having to implement things that should come natively? Are you the one they said that the thing you wanted is unnecessary because nobody does it? So this router is for you! I'm tired of people saying that I should implement work arounds in things that should support them, so I decided to make a router that can be fully customizable to your needs, meed RCR!

NPM JavaScript Style Guide Build Status npm Support

Install

npm install --save react-complete-router

Usage

import * as React			from 'react';

import { Router, Route } 	from 'react-complete-router';

export default function App () {
    return (
	  <Router>
	  	<Route to={<h1>Home</h1>} path="/">
	  	<Route to={<h1>About</h1>} path="/about">
	  </Router>
    );
}

Guards

Guards are what make this package unique, enabling to customize even our path algorythm, you may add and extend any behaviour inside of the router. We already come with some useful guards for you:

  • when : check a simple validation inside of the route to see if it can be rendered
  • path : our path check is a guard, so you can toggle with yours in case of need
  • guest : check if the router is auth logged and prevent render if so
  • logged : check if the router is auth logged and prevent to render if not so

Guards are separated in two categories: priority and non-priority. Priority are guards called inside of the guard prop, if they are not found inside of the router, the router will fail. Non-priority are the route props (with a few exceptions such as to and guard, that are reserved keywords) and won't cause any trouble if not found.

Experimental branch

If you want to keep up with the latest experiments and resources, you can check out this repository:

npm i git+https://github.com/darklight9811/react-latest-router.git

License

BSD-3 © aposoftworks