Closed
Description
Say a simple example:
class My extends Component{
constructor(props) {
super(props)
this.state = {}
this.hello=this.hello.bind(this)
}
componentDidMount() {
}
hello(){
console.log('hello')
}
render(){
return <View>
<Text>my ....my</Text>
<You/>
</View>
}
}
And in other components render():
render(){
return <View>
<My ref='my'/>
</View>
}
Then I can use
this.refs['my'].hello()
But after connect with redux,
My = connect()(My)
There wil be an error: this.refs.my.hello is not a function.
Anybody know how to fix this?
Metadata
Metadata
Assignees
Labels
No labels