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

@assiri/ionic-react-router

v0.1.2

Published

React Router v6 wrapper for @ionic/react

Downloads

2

Readme

@assiri/ionic-react-router

Description

An effort to get React Router v6 working with the Ionic Framework

Background

The goal of this project is to utilize the most of the React-Router v6 patterns with as minimal abstraction as possible.

<IonRouterOutlet> is part of the base @ionic/react package creating tight coupling. Internally it wraps all the routes in a component called <StackManager>.

In this lib, <StackManager> provides the same functionality and is passed to the <IonRouteOutlet> elements via <IonNavigationContext> and within the <StackManager> is an outlet from react-router-dom

STATUS

This is not production ready yet.

It might be that the current @ionic/react-router only renders one outlet at a time where at this is following React Router v6 patterns where a nested outlet will render as well as the parent outlet.


Installation

npm install @assiri/ionic-react-router

Usage

import { IonPage } from '@ionic/react';

/* Core CSS required for Ionic components to work properly */
import '@ionic/react/css/core.css';

/* Basic CSS for apps built with Ionic */
import '@ionic/react/css/normalize.css';
import '@ionic/react/css/structure.css';
import '@ionic/react/css/typography.css';

// Routing libs
import { IonNavigationContext } from '@assiri/ionic-react-router';
import {
  BrowserRouter,
  Navigate,
  Routes,
  Route,
  useLocation,
} from 'react-router-dom';

setupIonicReact();

export function App() {
  return (
    <BrowserRouter>
      <Routes>
        <Route
          element={
            <IonNavigationContext>
              <IonRouterOutlet />
            </IonNavigationContext>
          }
        >
          <Route
            path="/*"
            element={
              <IonPage>
                <h1>Main Page with Navigation</h1>
              </IonPage>
            }
          />
          <Route
            path="/profile/*"
            element={
              <IonPage>
                <h1>Profile</h1>
              </IonPage>
            }
          />
          <Route
            path="/profile/details"
            element={
              <IonPage>
                <h1>Profile Details</h1>
              </IonPage>
            }
          />
        </Route>
      </Routes>
    </BrowserRouter>
  );
}