Router

router in hooks

npm (scoped)

源码 Code

@spax/router

安装 Install

$ yarn add @spax/router

使用 Usage

in @spax/plugin-router

import { Router, Switch, Carrier, Link, useMatched } from "@spax/router";

export default ({ render }: ISlots) => {
  render.tap(
    "Router",
    [],
    (blocks: IBlock[], {useAuth, NotFound, Forbidden}: IPO, { scope }: IOptions): React.ReactNode => {
      return (
        <Switch
          level={1}
          blocks={blocks}
          scope={scope}
          loose={false}
          useAuth={useAuth}
          NotFound={NotFound}
          Forbidden={Forbidden}
        />
      );
    },
  );
};

更多请查看 @spax/demo-mui

results matching ""

    No results matching ""