export-import那些事
1. export default
1 | export default class App extends Component { |
1 | import App from './component/app'; //其实App不需要和export一直,import本身就默认是App导入了,此处只是自定一个引用名 |
2. export
1 | export function counter(state =0, action){ |
1 | import {INCREASE,DECREASE,INCREASASYCN} from "./action-types"; |
3. import * as
1 | export function increaseCreator(num){ |
1 | import * as actionCreator from '../redux/action-creator' |