LoginSignup
1
1

More than 5 years have passed since last update.

【React Native】Create Templetes

Last updated at Posted at 2018-08-16

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;

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1