Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

How to load array of data into dataset format using React Native?

$
0
0

In my-scenario, I am trying to format the dataset values. Here, I have an array of data that I want to load it into dataset format. Here are the below code, which I am loading manually. I want to do better optimised, auto index load data, because index basis not a good approach, anytime data will be increase or decrease.

How to achieve auto load with the below dataset format?

const dataSet = [    {        value: props.data[0],    },    {        value: props.data[1],    },    {        value: props.data[2],    },    {        value: props.data[3],    },    {      value: props.data[4],    },    {      value: props.data[5],    },    {      value: props.data[6],      svg: {        fill: Colors.WHITE,      },    },    {     value: props.data[7],    },]

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>