part of the code:
constructor(){ super(...arguments); this.state = { cards: this.props.cards, showAddCard: false }; } render(){ console.log(this.state.cards); console.log(this.props.cards); ... } this.props.cards is an array
console.log(this.state.cards); - displays an empty array (this is the problem !!!) console.log(this.props.cards); - displays privile array. How to shove the contents of the props in the state ?
super()console.log(this.props.cards);- displays a privile array, i.e. not empty. - Ilya