ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
**高阶组件是一个获取组件并返回新组件的函数。** ``` // React Redux's `connect` const ConnectedComment = connect(commentSelector, commentActions)(CommentList); 如果你把它分开,就会更容易看出发生了什么。 // connect is a function that returns another function const enhance = connect(commentListSelector, commentListActions); const ConnectedComment = enhance(CommentList); // The returned function is a HOC, which returns a component that is connected // to the Redux store ```