react-snake-game

Snake game that can be embedded in any React app

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
react-snake-game
1001.0.97 years ago7 years agoMinified + gzip package size for react-snake-game in KB

Readme

react-snake-game
NPM version Downloads David GitHub issues license GitHub stars NPM React Snake Game ========== A React component for embedding a game of snake into your app. The game board auto-scales to the size of it's parent element. Demo ---- See the demo here! Usage ----- You can install through npm: ```bash npm install --save react-snake-game ``` ```javascript import React from 'react'; import ReactDOM from 'react-dom'; import Snake from 'react-snake-game'; const WRAPPERSTYLE = {
margin : '30px auto',
height : 700,
width  : 700
}; const App = () => (
<div style={WRAPPER_STYLE}>
<Snake sound={true} />
</div>
); ReactDOM.render(, document.getElementById('root')); ```