tachyon-chat
v32.0.0
Published
Twitch Chat Implementation
Downloads
7
Readme
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
Create
chat.worker.js
, a Web Worker file, in your application containing the following:import { ChatService } from 'tachyon-chat'; new ChatService();
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.