Code Monkey home page Code Monkey logo

premier-league's Introduction

CircleCI

REACT CHALLENGE

Your mission is to improve a web application which displays the Premier League results.

There is a public API to fetch relevant data. It's mostly set up already.

We're providing you the initial setup and dependencies, but if you need, feel free to add further dependencies while keeping the core untouched (React 16, React Router 4.x, SuperAgent or similar XHR lib).

To run the project, you need to have Node (and NPM) installed:

npm install
npm start --reset-cache

Live Demo

Premier League - React Challenge - Erick Maeda

Screenshots

Images full screen

Tasks to perform

  • Create the Result in a PureComponent. A winning team should have its name in bold.

  • Make weeks start in 1 instead of zero (both visually and route-wise)

    • I didn't create a screen that only shows the week games. I show the week games on HomeScreen or RankingScreen together with table of results. I also have created the week results in the team page.
    • Based on other tables like, I show the last week first when the data is first available. The user can choose from the 1st to last week.
  • Create a function returning clubs stats given a club's array of results

  • Create a table of results

    • Compute goals
    • Compute wins
    • Compute draws
    • Compute losses
    • Compute goal difference
    • Compute position
  • Display club logos on results and team page

    • Display on Team Screen / Teams Screen / Home Screen
  • Style it the way you best see fit

  • Feel free to restructure/clean/test the code to best serve your solution

    • The project follow the structure.
      • actions - Actions dispatched from screen using redux-thunk to dispatch action
      • hocs - Using High Order Components with Compose from redux to reuse easily
      • assets - All the assets from using in the project. In this case only the Premier League & Sky logo.
      • components - The reusable components all in PureComponent.
      • configs - The configuration of redux and other configuration of the project, but in this case we have only the redux to configure.
        • Set the redux to use thunk as a middleware
        • Set the devtools of react-redux;
        • Set the persist store as a WebStorage
      • helpers - Utils for all the project.
      • reducers - The reducers used in this project. The index.js from reducers is the root that has the combineReducer()
      • screens - Screens used in this project. The index.js from screens configure all the routes with react-router-dom
      • selectors - It's like a query selector of reducers. It provide the data from reducer without the user know where is located the data.
      • services - We have a Rest API use to help us to make http requests using axios. It should be as abstracted as possible.

API

Premier League API

All the EndPoints are GET method.

League Rules

https://en.wikipedia.org/wiki/Premier_League#Competition_format

  • wins are awarded 3 points, draws 1 and losses 0
  • criteria for finding the Premier League ranking are:
  • total points
  • goal difference
  • goals scored

premier-league's People

Contributors

dependabot[bot] avatar erickmaeda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.