react-native
react-native copied to clipboard
[REFS] Not Work
I try set refs to component and when it calling RN return to me undefined. What Happend?
My code.
render() {
console.log(this.refs['testRef']);
return (
<View style={styles.mainView}>
<Button ref={'testRef'}/>
</View>
);
}