我有一个重组过滤器,它需要渲染两个组件并将来自 redux 的道具连接到第二个组件
然而,下面的代码从不渲染第二个 renderComponent - 这真是太可惜了。有没有办法让下面的工作,或者我应该选择一个常规的 React 组件?
import { compose, renderComponent } from "recompose"
import { connect } from "react-redux"
import Filters from "./filter/filter"
import Wrestlers from "./container"
const defaultState = state => ({
collection: state.roster,
})
export default compose(
renderComponent(Filters),
connect(defaultState),
renderComponent(Wrestlers),
)(Wrestlers)