Nameless Package Manager

    use-universal-router

    1.0.0 • Public • Published

    Universal router

    Simple but highly functioning router for client side and server side.

    Usage

    const router = useUniversalRouter('/containers/3/hello', [
      ['/pages/:page', 'page-detail'],
      ['/containers/:number/:id', 'container-detail'],
      ['/', 'home'],
      ['/about', 'about'],
    ]);
    
    // { match: 'container-detail', arguments: ['containers', '3', 'hello'] };

    Happy hacking!

    Install

    npm i use-universal-router

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    6.3 kB

    Total Files

    8

    Last publish

    Collaborators

    • fatih-erikli