Skip to content

benhurdavies/react-snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-snake-game

Build Status contributions welcome HitCount license

A simple game build using react.js Try out the game

Installation

  • Install Node
  • Install the dependencies
yarn install

Getting Started

yarn start

Open your browser at http://localhost:3000/

Features

React and Redux

  • create-react-app - Facebook's create-react-app is used to get a production-ready React application quickly off the ground. It configures things like Webpack and Babel, so you don't have to.

  • Redux - We use Redux to manage complex application state. In the app, you'll find an example workflow to add items to a list.

  • konvajs - we use react-konva for HTML5 2d canvas for game area. It is a reactjs wrapper for konvajs

Styling

  • styled-components - we use styled-components to manage style outside game area.

  • material-ui - React components that implement Google's Material Design. View the docs here.

Tooling

  • Prettier - Prettier is wonderful magic that formats your JavaScript code for you. It is configured (using Husky) to format JavaScript code in a precommit hook. You may also choose to configure Prettier with your editor of choice.

  • Hot Module Replacement (HMR) - Hot Module Replacement updates the application on code change, without refreshing. Redux state is maintained.

  • Redux DevTools - Chrome extension - The app is configured to allow this Chrome extension to display dispatched actions and state diffs.

Testing

  • Jest - Facebook's Jest is configured out of the box with create-react-app. This comprehensive testing tool is built on top of Jasmine and will satisfy most of your unit testing needs.

  • Enzyme - Enzyme is pulled in to facilitate easier component testing.

Continuous Integration

Travis CI runs tests on each branch. Successful merges to master are auto deployed to the GitHub Page.

Development is in progress and welcomes contributions.