import React from 'react';
import {
BrowserRouter as Router,
Route,
Link,
Switch,
HashRouter
} from 'react-router-dom'
//路由 页面 的加载(推荐单文件的写法)
// import Home from '../pages/home.jsx';
import Simple from '../pages/simple.jsx';
import Classify from '../pages/classify.jsx';
//懒加载方式
// const Classify = resolve => System.import('../pages/classify.jsx');
import BackPage from '../pages/backPage.jsx';
import Todo from '../store/container/todoContainer'
import Counter from '../store/container/couterContainer'
//不推荐这样写
const Home = () => (
);
// 路由配置
const routes = [
{path: "/", text: "home", component: Home},
{path: "/home", text: "home", component: Home},
{path: "/simple", text: "test", component: Simple},
{path: "/todo", text: "todo", component: Todo},
{path: "/counter", text: "counter", component: Counter},
{path: "/back", text: "back", component: BackPage},
{path: "/classify", text: "classify", component: Classify},
];
//主入口文件
import App from '../app.jsx';
const AppRouter = () => (
{
routes.map((page, index) => page.component ? : "")
}
);
export default AppRouter;