react-native-create-templete(flow)
Components
// @flow
import React, { Component } from 'react';
import { View, Text } from 'react-native';
import styles from './styles';
type Props = {
};
export default class MyComponent extends Component<Props> {
static defaultProps = {
};
render() {
return (
<View style={styles.container}>
</View>
);
}
}
Stateless Functional Components
// @flow
import React from 'react';
import { View } from 'react-native';
import styles from './styles';
type Props = {
};
const component = (props:Props) => {
const { value } = props;
return (
<View style={styles.container}>
</View>
);
}
export default component;
Styles
// @flow
import { StyleSheet } from 'react-native';
const styles = StyleSheet.create({
container: {
},
});
export default styles;