React

by Niels Krijger

HTML

<div id="app"></div>

React

// Do not edit - start
const scores = [
  { name: 'Joe', value: 5.0 },
  { name: 'Jane', value: 7.6 },
  { name: 'Jules', value: 6.1 },
  { name: 'Jennevieve', value: 2.2 }
];
// Do not edit - end

/**
 * Requirements:
 * 1. Create a component that takes a name and a value as properties and outputs them to the page.
 * 2. Output the scores array (see above) by making use of the component created in step 1.
 * 3. Sort entries by descending score value.
 * 4. Style the score board so that odd rows have a grey background. I.e. first row grey, second white, etc.
 * 5. Change the component you created in step 1 so that it is removed from the score board when clicked.
 */
 const App = props => {
	return (
	  <div>
      <h2>Score board</h2>
    </div>
  );
};

ReactDOM.render(<App />, document.getElementById('app'));