# hackbox-client

> A Jackbox inspired framework for creating party games - client component

Latest version **0.0.3** (published 2019-05-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install hackbox-client
pnpm add hackbox-client
yarn add hackbox-client
bun add hackbox-client
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2019-05-30 |
| First published | 2019-05-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 91 |
| Author | tomalama |
| Maintainers | tomalama |
| Keywords | realtime, framework, websocket, events, socket, client, jackbox, party, games |

## Links

- npm: https://www.npmjs.com/package/hackbox-client
- Repository: https://github.com/tomalama/hackbox/tree/master/packages/hackbox-client
- npm.io page: https://npm.io/package/hackbox-client

## Dependencies (1)

- [socket.io-client](https://npm.io/package/socket.io-client.md) ^2.2.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2019-05-30
- 0.0.2 — 2019-05-24
- 0.0.1 — 2019-05-23

## README

# `hackbox-client`

A Jackbox inspired framework for creating party games - client component.

## Usage

```javascript
const hackboxClient = require("hackbox-client");
```

### Hosting

```javascript
async componentDidMount() {
  const hackbox = await hackboxClient("http://localhost:8080");
  const room = await hackbox.createRoom();
  this.setState(() => ({ room }));

  hackbox.onPlayerJoin(room => {
    this.setState(() => ({ room }));
  });
}
```

### Joining a Room

```javascript
const hackbox = await hackboxClient("http://localhost:8080");
const playerId = await hackbox.joinRoom(roomId, name);
```

---
_Source: https://npm.io/package/hackbox-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
