I have a question re: how to load data from CSV into an array in React -- specifically inside the this.state as an object.
Lets say I start with this, where the state is just hardcoded values.
export default class App extends Component<{}> {
constructor(props) {
super(props);
this.state = {
cards: [
{itemname: 'Item 1',
restoname: 'Resto 1',
url: 'https://res.cloudinary.com/grubhub/image/upload/v1515191165/bkf4niv9okipbc8y6o8h.jpg',
description: 'Desc 1'},
{itemname: 'Item 2',
restoname: 'Resto 2',
url: 'https://res.cloudinary.com/grubhub/image/upload/v1514060352/twhriy3hvbzayktrjp91.jpg',
description: 'Desc 2'}
]
};
}
Is there a way for me to read in that data instead from a CSV where the data is like this?
Thanks everyone!
