比方说,我想要这样简单的内容
<View style={[styles.container, { backgroundColor, bottom }]}>
{this.props.children}
</View>
在这里,适合儿童的道具类型应该是什么?
子级可以是本机组件,其中包括scrollView,TextInput,Text等
<MyComponent>
<View>
<Text> Could be text </Text>
</View>
</MyComponent>
答案 0 :(得分:1)
我一直为孩子使用的是:
context, cancel := context.WithTimeout(context.Background(), ForceShutdownAfter*time.Second)
defer cancel()