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 found in App.js by making use of the component created in step 1. Sort entries by descending score (value)
 * 3. Style the score board so that odd entries have a grey background
 * 4. 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'));