0.1.2 • Published 5 years ago

@ice/stark-router v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

icestark-router

A router package for @ice/srark

NPM version NPM downloads

Installation

npm install @ice/stark-router --save

Example

import React from 'react';
import IceStarkRouter from '@ice/stark-router';

class App extends React.Component {
  render() {
    const routers = [{
      path: '/',
      key: 'index',
      component: () => <div>index page</div>,
      exact: true,
    }, {
      path: '/home',
      key: 'home',
      component: () => <div>home page</div>,
    }, {
      path: '/about',
      key: 'about',
      component: () => <div>about page</div>,
    }];
    return (
      <div>
        <IceStarkRouter routers={routers}/>
      </div>
    );
  }
}
0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.1

5 years ago