Skip to content

Instantly share code, notes, and snippets.

@ConradSulzer
Created November 11, 2021 16:28
Show Gist options
  • Save ConradSulzer/58e7f372af54ae8596fca9d400670492 to your computer and use it in GitHub Desktop.
Save ConradSulzer/58e7f372af54ae8596fca9d400670492 to your computer and use it in GitHub Desktop.
React Native Functional Component Template
import React, {useState, useEffect} from 'react'
import {StyleSheet, View} from 'react-native'
const MyFunctionalComponent = (props) => {
useEffect(() => {
//on load logic
}, [])
return (
<View style={{flex: 1}}>
</View>
)
}
MyFunctionalComponent.navigationOptions = (navigation) => {
return {
title: `My Title`,
headerStyle: {
backgroundColor: Colors.navigationBkgd,
},
headerTintColor: Colors.navigationColor,
}
}
const styles = StyleSheet.create({
})
export default MyFunctionalComponent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment