title: Handling checkbox in react-native using map()
body: <p>I am using <code>'@react-native-community/checkbox'</code> as I am retrieving data from database and rendering it whiting checkboxes using map function, the problem is when I check one box all boxes checked as well and same when I uncheck
  the problem is with state of each checkbox but I have no idea how to handle that as I want to make only sleeted checkbox being checked and get all its data into one array for further process.</p>
  <p>here the data I am rendering as checkboxes:</p>
  <pre><code>{&quot;id&quot;: &quot;12345&quot;, &quot;price&quot;: 5, &quot;text&quot;: &quot;Reload&quot;}
  </code></pre>
  <p>and this is the code of map function:</p>
  <pre><code>{data.map((b, index) =&gt; {
           return (
                     &lt;View key={b.id} style={{ flex: 1, flexDirection: 'column', width: windowWidth, paddingLeft: 15, paddingRight: 15 }}&gt;
                     &lt;View style={{ flexDirection: 'row-reverse', alignItems: 'center', justifyContent: 'space-between' }}&gt;
                            &lt;CheckBox
                               disabled={false}
                               value={checked}
                               onValueChange={(newValue) =&gt; { setIschecked(newValue) }}
  
                              /&gt;
  
                            &lt;Text&gt;{b.text}   &lt;/Text&gt;
                     &lt;/View&gt;
  
                     &lt;View style={{ flexDirection: 'row', alignItems: 'center' }}&gt;
  
                           &lt;Text style={{ fontSize: 10, fontWeight: 'bold', color: COLORS.darkgray }}&gt;  
                              {&quot; USD &quot; + b.price} 
                           &lt;/Text&gt;
                     &lt;/View&gt;
  
  
  
                &lt;/View&gt;
             )
         })} 
  </code></pre>
  <p>I found a question same as my problem exactly which <a href="https://stackoverflow.com/questions/64888702/handling-dynamic-checkbox-in-react-native-using-hooks">this one</a> but unfortunately that doesn't work for me</p>
  <p>thanks and advance</p>