@ice/stark-router
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

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>
    );
  }
}

Readme

Keywords

Package Sidebar

Install

npm i @ice/stark-router

Weekly Downloads

1

Version

0.1.2

License

MIT

Unpacked Size

7.58 kB

Total Files

5

Last publish

Collaborators

  • linbudu
  • answershuto
  • chenjun1011
  • luhengchang228
  • sobear
  • clarkxia
  • rax-publisher