title: React Js : Passing a condition to a state value based on another state value
body: <p>I have been scattering the internet in search of an answer but my guess is that what i am doing is either wrong or i don't know the right therm because i can't find any relevant answer. Long story short, i want to pass a condition to a state value that is based on another state value inside the constructor. Why? Because i am building a "Form Generator" and i want to be able to link an input to another one. Exemple : If a checked box is checked, then you can enter text inside a text input otherwise it is disabled. Pretty simple right? If anybody can just point me in a direction that would be great. So far this is what i have tried but it doesn't work. </p>
  
  <pre><code>constructor(props){
  
  this.state = 
  Inputs : [
    //Theres a bunch of inputs here
    {
       name : "Icon",
       group: 1,
       width: 6,
       type: "select",
       label: "Icon du menu",
       disabled: () =&gt;(
            !this.state.Inputs[0].value //I want to link the disable property to an
                                        //input value
       ),
        value: "" 
     }
  ]
  }
  </code></pre>
  
  <p>I have also tried to create a constraint object in my state and iterate trough the value during the mounting process but i found it to be too fragile and time consuming. If i could directly create the link inside the input object that would be great. </p>
  
  <p>Thanks for your time and great wisdom!<br>
  -Sam</p>