Skip to content

ScoreSummary component

Thomas Harper edited this page Jun 1, 2020 · 1 revision

The ScoreSummary component contains 4 core pieces of information:

  1. Your score
  2. Total Correct
  3. Total Incorrect
  4. Round Accuracy

It accepts from props the following components accordingly:

  • this.props.score
  • this.props.totalCorrect
  • this.props.totalIncorrect

And finally it calculates the the percentage accuracy as follow:

(totalCorrect / ( totalCorrect + totalIncorrect ) ) * 100

Then it takes this information and prints it to the screen.

Clone this wiki locally