CTP

import React, { Component } from 'react' import { AppRegistry, StyleSheet, Text, View, TouchableOpacity } from 'react-native' class Child extends Component{ myFun = ()=>{ //alert('myfun'); this.props.parentFun('minson')&&this.props.parentFun() } render(){ return( Child ) } } class App extends Component { parentFun = (param)=>{ alert(param) } render() { return ( ) } }

const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, welcome: { fontSize: 20, textAlign: 'center', margin: 10, }, })

AppRegistry.registerComponent('App', () => App)

JSRUN前端笔记, 是针对前端工程师开放的一个笔记分享平台,是前端工程师记录重点、分享经验的一个笔记本。JSRUN前端采用的 MarkDown 语法 (极客专用语法), 这里属于IT工程师。