JavaScript How to replace particular sub component from the main component using Navigator in react native

In my scenario <MainComponent /> having so many subcomponents .But particular subcomponent i need to populate the new data with all other subcomponents.

var MainComponent =  React.createClass({ 
     renderScene:function(route, navigator) {

         var type=this.props.type;
         if(type =="text"){
            <GetInputField/>
          }
         else if(type=="number"){
            <GetNumberField/>
         }
         else if(type=="image"){
            <GetImageField />

     //using this <GetImageField> component i am showing two buttons.
     //while click on the button i moving to another scene .
     //in this scene i am showing local images using CameraRoll component.
    // When select the image i need to populate that image in the <GetImageField/> component  through the navigator.
    // But i am unable to replace to the <GetImageField/> component using navigator
         }

     },

      render:function() {
          return(<Navigator
               renderScene={this.renderScene.bind(this)}
               navigator={this.props.navigator}
               navigationBar={
                 <Navigator.NavigationBar style={styles.navBarStyle}
                     routeMapper={NavigationBarRouteMapperDisplayCustomSchema} />
               } />)
     }

 })

In my scenario i need to populate the images in <GetImageField /> component with other components of <MainComponent/>

Answer:1

I guess we can say that this is very similar to an already asked question here (Optimisation/knapsack algorithm with multiple contraints in JavaScript), which hasn't yet an answer. Let say we like ...

I guess we can say that this is very similar to an already asked question here (Optimisation/knapsack algorithm with multiple contraints in JavaScript), which hasn't yet an answer. Let say we like ...

  1. best combination algorithm
  2. find best combination algorithm

Premise Let's say I have two different AMD-based AngularJS apps, each of them with their own sets of controllers, directives, services, etc. Each of them are bundled in their own dist/{app-name}.min....

Premise Let's say I have two different AMD-based AngularJS apps, each of them with their own sets of controllers, directives, services, etc. Each of them are bundled in their own dist/{app-name}.min....

  1. do containers share common dependencies

So, I have a page, where when a user holds left mouse button, Shrek images are drawn where his/her cursor is. The problem is, only one picture is created when the mouse is down, but I need an ENDLESS ...

So, I have a page, where when a user holds left mouse button, Shrek images are drawn where his/her cursor is. The problem is, only one picture is created when the mouse is down, but I need an ENDLESS ...

I have a string json object that I am trying to format and display in the html. I have tried using JSON.parse() and JSON.stringify() but the typeof is still showing as a string and it is displaying in ...

I have a string json object that I am trying to format and display in the html. I have tried using JSON.parse() and JSON.stringify() but the typeof is still showing as a string and it is displaying in ...

  1. formatting json string
  2. formatting json string in java
  3. formatting json string c#
  4. formatting json string js
  5. python string formatting json
  6. javascript formatting json string