Hello,
There is an issue with Thumbnail wrapped by TouchableHighlight. I am using Exponent XDE v14.0.0 and running the project on Genymotion emulator for Google Nexus 5 4.4.4 API 19.
I am able to tap Thumbnail wrapped by TouchableHighlight.
When I tap Thumbnail, I get "undefined is not an object (evaluating 'this.wrappedInstance.setNativeProps')".
import Exponent from 'exponent';
import React from 'react';
import {
Platform,
Alert,
TouchableHighlight
} from 'react-native';
import {
Container,
Header,
Body,
Title,
Content,
Thumbnail
} from 'native-base';
class App extends React.Component {
constructor (props) {
super(props);
this.state = {
isReady: false
};
}
async componentWillMount() {
if (Platform.OS === 'android') {
await Exponent.Font.loadAsync({
'Roboto': require('native-base/Fonts/Roboto.ttf'),
'Roboto_medium': require('native-base/Fonts/Roboto_medium.ttf')
});
this.setState({
isReady: true
});
}
}
render() {
if (!this.state.isReady) {
return <Exponent.Components.AppLoading />;
}
return (
<Container style={{ flex: 1 }}>
<Header>
<Body>
<Title style={{ alignSelf: 'stretch' }}>Test</Title>
</Body>
</Header>
<Content>
<TouchableHighlight onPress={ () => Alert.alert('Info', 'Image tapped') }>
<Thumbnail style={{ width: 50, height: 50 }} source={{ uri: 'http://www.apdconsumo.pt/person.png' }} />
</TouchableHighlight>
</Content>
</Container>
);
}
}
Exponent.registerRootComponent(App);


I have tested the project only on Android.
I think, you do not define the setNativeProps method in the Thumbnail component. Please, check Composite components and setNativeProps.
+1
I just tested it on iOS and android both and it works. Maybe exponent is causing this?
I also get this error with an icon in a TouchableHighlight, when the container is wrapped in a style provider

Strange!
This is the code in my case:
render() {
return (
<View style={{...this.props.style.container, height: this.state.height}}>
<View onLayout={this.setHeaderHeight}>
<TouchableHighlight onPress={this.toggle}>
<Text>click here</Text>
</TouchableHighlight>
</View>
<View onLayout={this.setContentHeight}>
{this.props.children}
</View>
</View>
);
}
}
export default connectStyle('zoraTheme.Accordion', styles)(Accordion);
And I'm getting the same error
I have just updated native-base to the latest version 2.0.11 and it started working. It did not work with native-base 2.0.10.
It worked with me as well after install 2.0.11
+1 to the 2.0.11 fix
Great! Closing it then.
@sankhadeeproy007
I'm already using 2.0.12, but the issue still comes up. Is it related to react native 0.42? Exactly having the Thumbnail in TouchableHighlight. Anyone?
The issue is back again in native-base 2.0.12.
I get the same error even if I use native-base Text in react-native TouchableHighlight:
import {
Alert,
TouchableHighlight
} from 'react-native';
import {
Text
} from 'native-base';
<TouchableHighlight onPress={ () => Alert.alert('Info', 'Text touched') }>
<Text>Click here</Text>
</TouchableHighlight>
However, if I use react-native Text, it works without issues:
import {
Alert,
TouchableHighlight,
Text
} from 'react-native';
<TouchableHighlight onPress={ () => Alert.alert('Info', 'Text touched') }>
<Text>Click here</Text>
</TouchableHighlight>
@sankhadeeproy007 , can you reopen the issue? The error comes up again for Thumbnail inside TouchableHighlight in 2.0.12.
Same as @stonecold123 , error comes up with Icon inside TouchableHighlight in 2.0.13.
@sankhadeeproy007 the issue was never resolved and it is breaking our projects. please reopen and fix it. click on the image to enlarge.

We are looking into the issue. As a workaround for now, you can wrap the child component of TouchableHighlight into a RN <View>.
To expand on @shivrajkumar 's workaround, you need to import the View component from React Native: using Native Base's View component still causes the error.
Fixed with 2.1.5
facing same issue
Most helpful comment
I get the same error even if I use native-base
Textin react-nativeTouchableHighlight:However, if I use react-native
Text, it works without issues: