Open walshe opened 7 years ago
you're already wrapping two higher order components (connect
and provideHooks
):
export default provideHooks(redial)(
connect(mapStateToProps)(
UnlistedVinsListPage
)
)
do the same with ui
export default provideHooks(redial)(
connect(mapStateToProps)(
ui(someUiParams)(
UnlistedVinsListPage
)
)
)
a relative newbie here to react , redux and redial..
If I am already using redial in a component (see below) how can I also use redux-ui (in the non decorator fashion) at the same time? I am already using provideHooks at the bottom of the file :
`import { provideHooks } from 'redial' import React, { PropTypes } from 'react' import { loadUnlistedVins, loadFilterData } from '../actions' import { connect } from 'react-redux' import UnlistedVinsFilter from '../components/UnlistedVinsFilter'
import YearFilter from '../components/YearFilter'
import { StyleSheet, css } from 'aphrodite' import Helmet from 'react-helmet' import { selectUnlistedVins } from '../unlistedVinsReducer' import { getFilterData } from '../filterDataReducer'
const redial = {
/**
const mapStateToProps = state => ({ unlistedVins: selectUnlistedVins(state), })
const UnlistedVinsListPage = ({ unlistedVins }) => (
)
UnlistedVinsListPage.PropTypes = { unlistedVins: PropTypes.array.isRequired
}
const styles = StyleSheet.create({ root: { maxWidth: 500 }, title: { fontSize: 28, margin: '0 auto 1.5rem', color: '#b7b7b7' } })
export default provideHooks(redial)(connect(mapStateToProps)(UnlistedVinsListPage)) `