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

undefined is not an object (evaluating 'this.wrappedInstance.setNativeProps') with TouchableHighlight #14917

Closed
Symous opened this issue Jul 10, 2017 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@Symous
Copy link

Symous commented Jul 10, 2017

Hi, after I update RN to 0.45.1 ,when I add a TouchableHighlight component to my page and set a onPress prop ,error undefined is not an object (evaluating 'this.wrappedInstance.setNativeProps') occured when I press in it.

<TouchableHighlight onPress={()=>{alert('666')}} style={{width:100,height:47,backgroundColor:'#F6585D'}}>
        <Text style={{alignSelf:'center',color:'white'}}>Button</Text>
</TouchableHighlight>

Platform: Android
RN Version : 0.45.1
OS: Windows 10 64 bit .

@Symous Symous changed the title this.wrappedInstance.setNativeProps with TouchableHighlight undefined is not an object (evaluating 'this.wrappedInstance.setNativeProps') with TouchableHighlight Jul 10, 2017
@Symous
Copy link
Author

Symous commented Jul 10, 2017

Sorry,Just have found that we need to wrapped the children of the TouchableX component into a View component.
:-)

@Symous Symous closed this as completed Jul 10, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Jul 10, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

2 participants