GithubHelp home page GithubHelp logo

challenge-high-score-tables's Introduction

Challenge: "High Score Tables (React)"

Challenge Overview

Make a React app which lists some high score tables. The scores data is provided for you.

Difficulty Level

This is a beginner challenge. Level 1 can be completed by students who have completed week 1 of the CYF React module.

Pre-reqs

  • react props
  • array.map method as used in React JSX

To finish level 4

  • event handling (handle a button click)
  • Keeping state with the state hook (useState)

Example Screenshot

Level 1 challenge screenshot example.

Example Screenshot

Level 1 Challenge

  • Write a React app which displays high score tables for the given data.

  • Each country must have its own High Score table displayed.

  • Your app must be hosted on Netlify (see "Hosting" below).

  • You must make AT LEAST:

    • HighScoreTable - a table with a country name and a list of player-scores for that country.
    • PlayerScore - component responsible for displaying a single score by one player (e.g. as one line of the table) (e.g. Neill 2000)

Getting Started

Don't clone this repo.

Make your own React app using create-react-app. See (this guide) if you have forgotten how.

Copy across the score file (or the score file's contents) from this repo to your app, and then import from that file.

Write a plain HTML prototype first for two or three countries (e.g. on codepen). THEN, once you know the HTML you're attempting to create, work on the React version! This is not mandatory but it is recommended.

The data:

The data is available in the file ./scores.js. Here is a raw version of it, suitable for saving.

You can copy this array of data into your App.js or you can import it.

Hosting:

Add your project in github and host it on Netlify.

The github repo name should be: high-scores-react

The netlify site suffix should be -scores

so...

cyf-YOURGITHUBUSERNAME-scores

Level 2

  • Present the High Score Tables sorted alphabetically by country name

Level 3

  • Within each individual table, show the highest scores first - i.e. sort the scores numerically, descending.

Level 4 - advanced (needs content from React week 2)

  • Add a single button at the top of the page which toggles the sort order of every high-score-table between ascending and descending by scores. This will require some study about event handlers and the use of a "State hook".

Level 5 - advanced

  • Add a "world-wide" table, shown first, which shows the sorted high scores from EVERYONE, regardless of country.

Bonus

  • Add your own country and scores!
  • Add some old-skool videogame icons or animations

challenge-high-score-tables's People

Contributors

lovespictures avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.