MadRiver44 / Github-Battle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Github Battle

App screenshot

Description

Select two GitHub users and see who wins!

Deployment

To play click HERE

Technologies used

  • React
  • React Router 4
  • Javascript/ ES6
  • FlexBox
  • Git
  • Firebase
  • Webpack
  • Babel

App Design and Build

This was an excercise in learning additional aspects of React and the tooling involved. I learned and incorporated best practices of code organization, function composition, and client side routing.

In /utils/api.js, by exporting this module to other components, code reuse and api requests were maximized and organized centrally.

Webpack.js has a basic conditional configuration that depends on if the node environment detected was in production or development. The build was optimized with the UglifyJsPlugin.

App.js is the entry point for the app and here, Routes are defined and a Switch component is used as a fallback for a 404.

Battle.js contains a controlled component to handle player input. Battle holds state and passes props down to another component, PlayerPreview.js.

The rest of the components provide additional functionality such as the Results component, and we data is generally mapped over and rendered in a flexible grid. this can be seen in the Popular component as well.

I'd like to thank Tyler Mcginnis for the react router 4 tutorials and fundamentals courses for helping me soidify React concepts.

About


Languages

Language:JavaScript 88.5%Language:CSS 10.7%Language:HTML 0.8%