Skip to content

Instantly share code, notes, and snippets.

@rocksinghajay
Last active April 30, 2019 18:28
Show Gist options
  • Save rocksinghajay/cb11f9ea446a52971d4c0738fc88b2b0 to your computer and use it in GitHub Desktop.
Save rocksinghajay/cb11f9ea446a52971d4c0738fc88b2b0 to your computer and use it in GitHub Desktop.
import React from 'react'
import { View, Text, Button } from 'react-native'
import { connect } from 'react-redux'
class DetailsScreen extends React.Component {
render() {
const { dummyReducer = {} } = this.props
const { text = ''} = dummyReducer
return (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Text>Details Screen</Text>
<Text>My name is : {text}</Text>
<Button
title="Go to Home"
onPress={() => {
this.props.navigation.navigate('Home')
}}
/>
</View>
);
}
}
export default connect(({dummyReducer}) => ({dummyReducer}))(DetailsScreen)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment