1.
import React, {Component} from 'react'; //引入模块儿(es6)
const styles = require('./HospitalList.scss'); //(es5)
// 基本组件
export default class HospitalList extends Component {
render() {
return (
<div>基本组件</div>
);
}
}
2.index.js中
export HospitalList from './Appointment/HospitalList';
// 将HospitalList.js文件中的HospitalList组件输出
3.route.js中
import {
HospitalList
} from 'containers';
export default (store) => {
const requireLogin = (nextState, replace, cb) => {
return (
<Route>
<Route path="hospital-list" component={HospitalList} />
</Route>
);
}; //加入路由