React-Native-WebStorm代码模版

具体请参考:http://www.jianshu.com/p/cbec02ccc273?utm_campaign=hugo&utm_medium=reader_share&utm_content=note&utm_source=qq

1-: 选择Preferences;
2-:搜索框输入Templates;
3-:点击File and Code Templates
4-:选中JavaScript File
5-:删除里面的代码,把以下代码复制进去(此代码可以自定义):

import React, { Component } from 'react';
import {
  StyleSheet,
  Text,
  View,
  Image,
} from 'react-native';

export default class  ${NAME}  extends Component {
  render() {
    return (
      
       
      
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
});

6-:点击Apply

你可能感兴趣的