Permalink
Browse files

Refactoring setState()

  • Loading branch information...
SonnyFishback committed Nov 8, 2019
1 parent 03c5ec9 commit a0c7855494c47e137d29298f51a30c0eecfb6090
Showing with 4 additions and 8 deletions.
  1. +1 −1 README.md
  2. +1 −1 src/App.js
  3. +2 −6 src/WordCard.js
@@ -45,7 +45,7 @@ by: sp
- Add sound
- Switch to WordLinks API

## Tips:
## Tips:

###### You can a images by using image tags and the relative link. You can also use [make me a read me](https://www.makeareadme.com/) to write out your read me and see it while you type it.

@@ -9,7 +9,7 @@ function App() {
return (
<div className="App">
<Navagation/>
{/* < BackgroundImage /> */}
< BackgroundImage />
</div>
);
}
@@ -24,9 +24,7 @@ class WordCard extends Component {
getDictionary() {
const wordOfTheDayArray = this.props.wordOfTheDayArray;

this.setState({
wordOfTheDayArray: wordOfTheDayArray
});
this.setState({wordOfTheDayArray});

const randomIndexNumber = Math.floor(
Math.random() * wordOfTheDayArray.length
@@ -36,9 +34,7 @@ class WordCard extends Component {

// const audioUrl = `https://media.merriam-webster.com/soundc11/${audioNameFirstLetter}/${audioName}.wav`;

this.setState({
wordOfTheDay: wordOfTheDay
});
this.setState({wordOfTheDay});

axios
.get(

0 comments on commit a0c7855

Please sign in to comment.