我的文件中有这个:
export default withAuth(authOptions)(ProfilePage);
但我还需要导出这个:
function mapStateToProps (state) {
const { isLoggedIn } = state
return { isLoggedIn}
}
const mapDispatchToProps = dispatch =>
bindActionCreators({ logInUser }, dispatch)
export default connect(
mapStateToProps,
mapDispatchToProps
)(ProfilePage)
我可以将它们结合起来,这样它们都可以工作吗?