【发布时间】:2017-10-19 09:41:58
【问题描述】:
我正在慢慢学习如何将事物分解为组件,但我的强迫症对一个特定的组件感到很生气。我有一个包含许多不同卡片/面板的选项卡视图。标准仪表板。然而,随着我添加新卡片(和 redux 操作),我的导入语句正在快速增长。
import { fetchUser, matchUser, stopMatchUser } from '../../actions/userAction'
import { fetchMatches } from '../../actions/matchAction'
import MatchingCard from '../../components/MatchingCard'
import MapCard from '../../components/MapCard'
import ImageCard from '../../components/ImageCard'
import DocumentCard from '../../components/DocumentCard'
整理这些的标准模式是什么?将所有这些类放在一个文件中?我打算创建一个导入文件,但我仍然处于添加许多导入的相同场景?
任何建议将不胜感激。
【问题讨论】:
标签: javascript reactjs module webpack redux