title: React Native Js - TypeError: l.map is not function
body: <p>i m new on Js and React,for my semester 2, I have to make an application of Macronutrient.</p>
  
  <p>The problem is that I would like to use a Piechart with the values of my state.</p>
  
  <p>for pie chart a isued react-native-chart-kit</p>
  
  <p>u can see on this link : <a href="https://www.npmjs.com/package/react-native-chart-kit" rel="nofollow noreferrer">https://www.npmjs.com/package/react-native-chart-kit</a></p>
  
  <p>I tried </p>
  
  <p>Piechart</p>
  
  <pre><code>&lt;PieChart
                                          width={screenWidth}
                                          data={{
                                              datasets: [{
                                                  data: [
                                                      { name: 'Glucide', nb:this.state.glucide, color: '#F00', legendFontColor: '#F00', legendFontSize: 15 },
                                                      { name: 'Proteine', nb: this.state.protaine, color: '#4250f4', legendFontColor: '#4250f4', legendFontSize: 15 },
                                                      { name: 'Lipide', nb: this.state.lipide, color: '#04e578', legendFontColor: '#04e578', legendFontSize: 15 },
                                                  ]
                                              }]
                                          }}
                                          height={220}
                                          accessor="nb"
                                          chartConfig={chartConfig}
                                          backgroundColor="transparent"
                                          absolute/&gt;
  
  </code></pre>
  
  <p>and i get TypeError: l.map is not a function. (In'l.map(c)','l.map' is undefined</p>