// 文件名LibraryReducer.jsimport data from './LibraryList.json';export default () => data;一個react-native項目里關(guān)于redux的一段代碼,就簡單地引入json數(shù)據(jù),然后輸出我想知道:這里為什么用了一個剪頭函數(shù)?為什么直接export default data不可以?還有在json文件里面并沒有export,為什么在這里就可以直接import?// 這是調(diào)用用的代碼export default combineReducers({ libraries: LibraryReducer});謝謝各位
es6中的import 和 export
阿晨1998
2019-03-13 17:19:55