में नेविगेटर का उपयोग करके घटक को गतिशील रूप से नए प्रोप जोड़ने के लिए कैसे करें मेरे परिदृश्य में मैं नेविगेटर का उपयोग कर घटक प्रस्तुत कर रहा हूं। उस घटक में मैं रिकॉर्ड को सहेजने जैसी कुछ क्रियाएं करता हूं, फिर मैंने मौजूदा घटक को गतिशील रूप से एक नया प्रोप जोड़ा। लेकिन यहां गतिशील प्रोप उस घटक में दिखाई नहीं दे रहा है केवल पिछले प्रोप केवल दृश्यमान है। नेविगेटर का उपयोग कर घटक को गतिशील प्रोप जोड़ने के लिए कैसे प्राप्त करें।प्रतिक्रियात्मक
यहाँमैं जबकि मूल निवासी नाविक प्रतिक्रिया मैं नीचे के रूप में
this.props.navigator.push({
id: 'DisplayCustomSchema',
name: 'DisplayCustomSchema',
org:this.props.org
});
तरह DisplayCustomSchema घटक बोल रहा हूँ DisplayCustomSchema घटक componentDidMount
में मैं एक ajax पोस्ट यह यह कुछ डेटा वापस बोल रहा हूँ का उपयोग कर कोड प्रदान कर रहा हूँ।
var DisplayCustomSchema = React.createClass({
componentDidMount : function(){
ajaxpost(data){//example only
this.props.record=data
//here i am try to move response data to props because I am using this data in saveRecord function but in save record props contain name and org only
}
}
render: function(){
<View>
<TouchableHighlight style={styles.touchButtonBorder} underlayColor="#ffa456" onPress={saveRecord.bind(this,this.props)}>
<Text style={styles.button}>SAVE</Text>
</TouchableHighlight>
</View>
}
})
यहाँ
मेरे सवाल क्यों डेटा रंगमंच की सामग्री के लिए ले जाता है नहीं है
क्या आप हमें कुछ कोड दिखाना चाहते हैं? –