arunoda / react-komposer

Feed data into React components by composing containers.
MIT License
733 stars 70 forks source link

Iam getting following error, when i try to restructure an array TypeError: Cannot read property 'map' of undefined react #181

Open Tiruvengadam85 opened 4 years ago

Tiruvengadam85 commented 4 years ago

` return items.map(item => (

  • {item}
  • ));

    ` Below is the items array 0: {applied_rule_ids: "XXX", base_currency_code: "AED", base_discount_amount: -310, base_grand_total: 300, base_discount_tax_compensation_amount: 14.78} 1: {applied_rule_ids: "YYY", base_currency_code: "AED", base_discount_amount: 0, base_grand_total: 170, base_discount_tax_compensation_amount: 0} 2: {base_currency_code: "AED", base_discount_amount: 0, base_discount_invoiced: 0, base_grand_total: 50, base_discount_tax_compensation_amount: 0} 3: {base_currency_code: "AED", base_discount_amount: 0, base_discount_invoiced: 0, base_grand_total: 100, base_discount_tax_compensation_amount: 0}

    Any one please suggest