0.0.6 • Published 2 years ago

@utils-lib/react-module v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

配置文件(router.ts)

import React from 'react';
import { useRoutes } from 'react-router-dom';
import { lazyRouter } from '@utils-lib/react-module';

const routes = lazyRouter([
  {
    path: '/login',
    element: () => import('@/pages/login'),
  },
  {
    path: '/home',
    element: () => import('@/pages/home'),
    children: [
      {
        path: '/home/about',
        element: () => import('@/pages/about'),
      },
    ],
  },
]);

export default () => useRoutes(routes);
0.0.5

2 years ago

0.0.4

2 years ago

0.0.6

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago