我想通过每次在文本输入上发生更改但结果不正确时调用函数searchFilter(text)来保存withState('search','setSearch')的值。当我输入H => search = undefined时,他=> search = H
withState('search','setState')
withHandlers({
searchFilter: props => (text) => {
props.setSearch(text)
console.log("search"+props.search);
props.print();
}
})
常量默认值
<TextInput style={{ width: '90%' }} onChangeText={(text) =>
props.searchFilter(text)}></TextInput>
任何人都知道做什么
views={[
{
title: 'Menu',
view: <MenuScreen {...props} key="1" activeSwipeTab={0} />
}]}
{... props}在这里是什么意思?它将道具从当前类发送到MenuScreen类吗?