1
例如,我們有一個容器<ContainerName data=someData>
並通過一些道具數據。React重新組合通道道具
在這個容器中,我們使用重新構圖並有下面的代碼:
const enhance = compose(
withProps({
statuses: ['ordered', 'received'],
}),
withProps(
// how do I pass props from this container to component ?
),
withState('error', 'setError', false),
withState('successAdded', 'setSuccessAdded', false),
withState('loading', 'setLoading', false),
withState('confirmModal', 'setConfirmModal', false),
...
export default enhance(ComponentForm);
我們如何通過屬於該容器,以我們的組件的道具?