1.0.11 • Published 1 month ago

snoken v1.0.11

Weekly downloads
52
License
MIT
Repository
github
Last release
1 month ago

snoken

A take on the classic snake game from back in the early days of mobile game development.

npm npm npm

The name "snoken" is Swedish for "the snake", or specifically one type of snake that is common in Sweden.

alt text

Install

npm install snoken

Quickstart

import React from 'react';
import Snoken from 'snoken';

function App() {

  return (
    <div className="my-app-container">
      <Snoken />
    </div>
  );
}

Local Development

Make sure you have npx installed locally, then create a new dummy react app (not in Snoken project folder).

npx create-react-app snoken-dummy

cd snoken-dummy

npm link /path/to/snoken

cd /path/to/snoken

npm link /path/to/snoken-dummy/node_modules/react

The above will create a new React app that you can use to test package components during development. The last step with linking to the react package will prevent more than one instance of React and ReactDOM to be used, which would cause issues with hooks.

Once that is done, simply go to the new snoken-dummy folder and open the file src/App.js and import the Snoken component and add it to the App body.

import './App.css';

import Snoken from "snoken";

function App() {
  return (
    <div className="App">
      <header className="App-header">
        <Snoken />
      </header>
    </div>
  );
}

export default App;
1.0.9

1 month ago

1.0.11

1 month ago

1.0.10

1 month ago

1.0.8

2 months ago

1.0.7

2 months ago

1.0.6

2 months ago

1.0.5

2 months ago

1.0.4

2 months ago

1.0.2

2 months ago

1.0.1

2 months ago

1.0.3

2 months ago

1.0.0

3 years ago