1. import React, { Component } from 'react';
    2. import list from './dart'
    3. class index extends Component {
    4. constructor(props){
    5. super(props);
    6. this.state ={
    7. list
    8. }
    9. }
    10. }
    11. render() {
    12. return (
    13. {this.state.list.map((item,index)=>{
    14. return(<p>{item.productName}</p>)
    15. })}
    16. )}