In my script, I process the component using a navigator. In this component, I perform some actions, such as saving the record, after which I added a dynamic addition to the existing component. But here the dynamic support is not visible in this component, only the previous details are visible only. How to achieve adding dynamic support to a component using the navigator.
here I provide the code when using the React Native navigator. I call the DisplayCustomSchema component as shown below.
this.props.navigator.push({ id: 'DisplayCustomSchema', name: 'DisplayCustomSchema', org:this.props.org });
In the component DisplayCustomSchema componentDidMount I call one ajax post, it returns some data.
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> } })
here is my question why the data does not move to the details
source share