taro hooks
taro 使用react hooks
import Taro, { useState } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import './index.less'
const Child = (props)=>{
return <Text>Child Name: {props.userName}</Text>
}
export default function App() {
const [info,] = useState('island')
const [userName,] = useState('child island')
return (
<View className='index'>
<Text userName={userName}>{info}</Text>
</View>
)
}