32.0.0 • Published 3 months ago

tachyon-chat v32.0.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
3 months ago

Tachyon-Chat

An SSR compatible Twitch Chat implementation via Web Workers.

yarn add tachyon-chat tachyon-intl

How To Use

Add Polyfills

Tachyon-Chat relies on the use of tachyon-polyfill for its web worker.

Create And Build The Web Worker

  1. Create chat.worker.js, a Web Worker file, in your application containing the following:

    import { ChatService } from 'tachyon-chat';
    
    new ChatService();
  2. Add app build config for the web worker. If consuming as part of a webpack built app, use worker-loader.

Development Notes

async/await

This package does not use async/await and instead uses promises directly. This enables us to avoid relying on certain polyfills, which means smaller bundles and less configuration for consumers.