Skip to content

Instantly share code, notes, and snippets.

@anghelalexandra
Created May 14, 2018 20:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anghelalexandra/b9fa76e87ece8fdc3d96f100216c438e to your computer and use it in GitHub Desktop.
iOS and Android apps with React Native - React Native Component
import React from 'react';
import { View, Text, Image } from 'react-native';
import PropTypes from 'prop-types';
import styles from './styles';
class ExampleRNComponent extends React.Component {
render() {
return (
<View style={styles.w100}>
<View style={styles.menuTitleWrap}>
<Image
source={this.props.url}
style={styles.shadowImage}
/>
</View>
<Text>{this.props.title}</Text>
</View>
);
}
}
ExampleRNComponent.propTypes = {
url: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
};
export default ExampleRNComponent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment