Skip to content

Instantly share code, notes, and snippets.

@AllGistsEqual
Last active February 16, 2020 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AllGistsEqual/c14e5c68271e561b527d31fcba9ec7e4 to your computer and use it in GitHub Desktop.
Save AllGistsEqual/c14e5c68271e561b527d31fcba9ec7e4 to your computer and use it in GitHub Desktop.
// src/components/other/VersionTag.jsx
import React from 'react'
import { Text } from 'react-native'
import { connect } from 'react-redux'
const VersionTag = ({ applicationState: { version, name } }) => (
<Text>{`${name} (v${version})`}</Text>
)
const mapStateToProps = (state) => ({
applicationState: state.application,
})
export default connect(
mapStateToProps,
)(VersionTag)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment