react-router-ext

0.0.1 • Public • Published

react-router-ext.

An Extended react-router-dom with simple usage

API

Table of Contents

Usage

An Example usage react-router-ext.

Parameters

Properties

Examples

const routeList = [
 // Basic 
 {
   path: '/',
   component: Home,
   exact: true,
 },
 
 // With Wrapper Component
 {
   path: '/',
   component: Home,
   exact: true,
   wrapper: AuthComponent,
 },
 
// With Routes
 {
   path: '/',
   component: Home,
   exact: true,
   wrapper: AuthComponent,
   routes: [
     {
       path: '/article',
       component: Article,
       exact: true,
       routes: [
         {
           path: '/categories',
           component: Category,
           exact: true,
         },
       ]
     },
   ]
 }
 
]
 
// Render
ReactDOM.render(<MainRoute routes={routeList}/>, node)

Returns ReactElement

Route

Type: Object

Properties

Credits

Readme

Keywords

none

Package Sidebar

Install

npm i react-router-ext

Weekly Downloads

3

Version

0.0.1

License

MIT

Unpacked Size

250 kB

Total Files

11

Last publish

Collaborators

  • ri7nz