@casperiv/use-socket.io
TypeScript icon, indicating that this package has built-in type declarations

6.0.1 • Public • Published

use-socket.io

Simple package to use Socket.io with React hooks.

Installation

# npm
npm install @casperiv/use-socket.io

# Yarn
yarn add @casperiv/use-socket.io

# pnpm
pnpm install @casperiv/use-socket.io

Usage

// src/App.tsx
import { SocketProvider } from "@casperiv/use-socket.io";

export default function App() {
  return (
    <SocketProvider
      uri="http://localhost:3030"
      options={
        {
          /** ... */
        }
      }
    >
      <App />
    </SocketProvider>
  );
}

Documentation

You can view documentation here

/@casperiv/use-socket.io/

    Package Sidebar

    Install

    npm i @casperiv/use-socket.io

    Weekly Downloads

    78

    Version

    6.0.1

    License

    MIT

    Unpacked Size

    6.31 kB

    Total Files

    5

    Last publish

    Collaborators

    • casperiv