React based snake game. Main purpose - use as little packages as possible to grasp basic main principles of plain react.
yarn add react-old-snake-game
And you should import styles
import 'react-old-snake-game/dist/assets/css/index.css'
import Snake from 'react-old-snake-game';
import 'react-old-snake-game/dist/assets/css/index.css'
const App = () => {
return (
<Snake/>
)
}
export default App
- With arrow keys
- w goes ↑
- d goes →
- s goes ↓
- a goes ←