Here i am using two components,
var first = React.createClass(){
render:function(){
<View>
<Text>First Component</Text>
<TextInput style={{borderWidth:1,borderColor:'red'}} onPress={getData()}/>
</View>
}
})
function getData(){
<second/>
}
var second = React.createClass(){
render:function(){
<View>
<ScrollView>
<Text>Second component</Text>
</ScrollView>
</View>
}
})
Required Result: First Component Second component