Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么使用 withRef 。 #81

Open
liliangzdh opened this issue Sep 20, 2019 · 0 comments
Open

怎么使用 withRef 。 #81

liliangzdh opened this issue Sep 20, 2019 · 0 comments

Comments

@liliangzdh
Copy link

liliangzdh commented Sep 20, 2019

1.正常的是这样的。(ts文件)
@connect((state: stateStore,) => {
return {app: state.app}
})

使用其他方式可以

  1. function mapStateToProps(state: stateStore) {
    return {
    app: state.app
    };
    }
    export default connect(mapStateToProps,null, null,{withRef:true})(Notice);

2.或者使用这样的也可以。
const mapdata = { withRef: true,};
@connect(
null ,
null,
null,
mapdata,
)

现在的问题来了。要使用 被connect的主键。 withRef 怎么加上去。用正常的?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant