本文共 675 字,大约阅读时间需要 2 分钟。
import React, { Component } from "react"import { View, Text } from "react-native"import PropTypes from "prop-types"class ${ NAME} extends Component { constructor(props) { super(props) this.state = { } } static propTypes = { //define the prop types // tempStr: PropTypes.string, // tempMethod: PropTypes.object // onClickRightIcon: PropTypes.func.isRequired } static defaultProps = { //default values for props } render() { const { ...props } = this.props return () }}const styles = StyleSheet.create({ xxx: { }})export default ${ NAME} hello word
转载地址:http://gccqi.baihongyu.com/