我可以使用redux-observable史诗来触发组件中的功能吗?
这实际上是我所需要的:
//I call this function from a button press in my component
const veganPress = (props, refs) => {
props.updateShowProductIsVeganModal(true) //dispatches an action
.then((actionResponseString) => { //need a promise so we can access the component.refs after the epic has finished
refs.toast.show(actionResponseString)
})
}
然后,我需要介绍redux-thunk或redux-promise。既然我已经有了,可以用redux-observable做到这一点吗?