From 4521dac524c7e7690cd7145bdc1c49c31db6f0e9 Mon Sep 17 00:00:00 2001 From: Robbie Antenesse Date: Wed, 21 Sep 2016 18:25:39 -0600 Subject: [PATCH] You need to return the value after you map it to the array, you idiot! Now I need to go back and abstract the word data so it gets passed as a reference to the Word component instead of as straight data so it'll be easier to save/load. --- src/components/Dictionary.jsx | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/components/Dictionary.jsx b/src/components/Dictionary.jsx index afcde81..d38dfe0 100644 --- a/src/components/Dictionary.jsx +++ b/src/components/Dictionary.jsx @@ -11,14 +11,7 @@ export class Dictionary extends React.Component { name: "New", description: "A new dictionary.", createdBy: 'Someone', - words: [{ - name: 'word', - pronunciation: 'pronunciation', - partOfSpeech: 'partOfSpeech', - simpleDefinition: 'simpleDefinition', - longDefinition: 'longDefinition', - wordId: 'wordId' - }], + words: [], nextWordId: 1, externalID: 0, allowDuplicates: false, @@ -34,7 +27,7 @@ export class Dictionary extends React.Component { showWords() { let words = this.state.words.map((word, index) => { -
- {this.showWords()}