Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 是否需要在表单标记中包装redux表单字段?_React Native_Redux_React Redux_Redux Form - Fatal编程技术网

React native 是否需要在表单标记中包装redux表单字段?

React native 是否需要在表单标记中包装redux表单字段?,react-native,redux,react-redux,redux-form,React Native,Redux,React Redux,Redux Form,我不熟悉redux表单。我试图利用它为我的react原生应用程序中的一个文本输入字段提供的好处,该应用程序是用Typescript编写的,实际上只是一个文本输入字段 <Field name="payoutInput" type="text" component={this.renderPayout}/> private renderPayout = (field: any) => ( <View style={{flexDirection: "row", fle

我不熟悉redux表单。我试图利用它为我的react原生应用程序中的一个文本输入字段提供的好处,该应用程序是用Typescript编写的,实际上只是一个文本输入字段

<Field name="payoutInput" type="text" component={this.renderPayout}/>

private renderPayout = (field: any) => (
    <View style={{flexDirection: "row", flex: 0.22, justifyContent: "flex-end"}}>
      <Text style={{fontSize: 17}}>
        $
      </Text>
      <TextInput style={{fontSize: 17}} defaultValue={String(this.props.balance)} autoFocus={true} keyboardType={'number-pad'} onEndEditing={this.calculatePayout}/>
    </View>
  )

私有renderPayout=(字段:any)=>(
$
)
我注意到的是,当我监视reactotron中的状态时,实际上看不到state表单中的值。使用
formValueSelector
也只会给我
undefined
。所以我想知道是否有必要将
字段
包装成一个表单


很高兴提供所需的更多上下文。

是;这就是它将输入连接到redux表单状态的方式

这一点在本文中有所说明


redux表单文档还表示要遵循开始,并且两种资源都没有表明它在React Native下的工作方式不同。

如果是这种情况,我应该使用什么来包装typescript中的
字段