-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Water - Iris #45
base: master
Are you sure you want to change the base?
Water - Iris #45
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall not bad Iris, you had things mostly working. See my comments on the Game.js
file. Some of the tests are failing because your props are different than the ones the tests were using. They make assumptions about your code that is different. You also have one bug I've identified so you're missing a field. That's why some of the other tests are failing.
Other than that you have a fully functional Exquisite Corpse game. Nice work. You did demonstrate the skills we were assessing.
import PropTypes from 'prop-types'; | ||
import './FinalPoem.css'; | ||
|
||
const FinalPoem = (props) => { | ||
|
||
const [finalSentence, setFinalSentence] = useState('') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does finalSentence
need to be in state? Could props work just as well?
Also the tests make some assuptions about the props that you've chanced, which is why they don't pass.
@@ -13,6 +16,23 @@ const Game = () => { | |||
} | |||
}).join(' '); | |||
|
|||
const addSentence = (formFields) => { | |||
const newSentences = [...sentences] | |||
newSentences.push(`The ${formFields.adj1} ${formFields.noun1} ${formFields.adverb} ${formFields.verb} the ${formFields.adj2} ${formFields.noun2}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The adverb
here is not getting pushed into the sentence.
newSentences.push(`The ${formFields.adj1} ${formFields.noun1} ${formFields.adverb} ${formFields.verb} the ${formFields.adj2} ${formFields.noun2}`) | |
newSentences.push(`The ${formFields.adj1} ${formFields.noun1} ${formFields.adv} ${formFields.verb} the ${formFields.adj2} ${formFields.noun2}`) |
Assignment Submission: Exquisite React
Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.
Reflection