は、私が<a href="http://facebook.github.io/react-native/releases/0.26/docs/pickerios.html#content" rel="nofollow noreferrer">react-native site</a>の公式チュートリアルに従うことによって、自分のアプリケーションでネイティブピッカーを実装しようとしています
[iOSの中で実行されている]のネイティブピッカー要素項目有効ではありません反応します。しかし、私は次の問題を抱えています。私はそれが私のimportステートメントの構文に起因すると推測しています。私はネイティブとリアクションの初心者でもあるので、同じことについてのいくつかのガイドラインとこのエラーを解決する方法に感謝します。例以下は
import React, {
Component,
} from 'react';
import {
Text,
View,
StyleSheet,
UIExplorerBlock,
UIExplorerPage,
Platform,
Switch,
AppRegistry,
Picker,
TouchableWithoutFeedback,
} from 'react-native';
const Item = Picker.Item;
========================
render: function(){
return <View style = {styles.container}>
<Text>
Choose the number of team or players.
</Text>
<UIExplorerBlock title="Basic Picker">
<Picker
style={styles.picker}
selectedValue={this.state.selected1}
onValueChange={this.onValueChange.bind(this, 'selected1')}>
// <Picker.Item label="hello" value="key0" />
// <Picker.Item label="world" value="key1" />
<Item label="hello" value="key0" />
<Item label="world" value="key1" />
</Picker>
</UIExplorerBlock>
</View>
}
「UIExplorerBlock」は「反応ネイティブ」の一部ですか?私は、サンプルプロジェクトのその部分をhttps://github.com/facebook/react-native/blob/master/Examples/UIExplorer/UIExplorerBlock.js – Jickson
と正確に考えました。それが問題の原因でした。私は彼らが与えた事例に失望しています。私はそこに何かこれを使用しないように伝える文書がなかったということです。 –
えええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええええ> – Jickson