6.0.1 • Published 8 months ago

@casperiv/use-socket.io v6.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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