1.0.9 • Published 4 years ago

space-chat v1.0.9

Weekly downloads
18
License
MIT
Repository
-
Last release
4 years ago

space-chat

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save space-chat

or

yarn add space-chat

Usage

Creating or finding a channel by unique name

import { Chat } from 'space-chat'

function App() {
  return (
    <div>
      <Chat
        provider='twilio'
        token='user-token'
        identity='jon-doe'
        channelName='unique-channel-name'
        onReady={() => console.log('Chat is ready')}
        onError={(error) => console.log('Chat error', error)}
      />
    </div>
  )
}

export default App

Finding a channel by Sid

import { Chat } from 'space-chat'

function App() {
  return (
    <div>
      <Chat
        provider='twilio'
        token='user-token'
        identity='jon-doe'
        channelSid='CH164f325e19364483a3d5531581afb990'
        onReady={() => console.log('Chat is ready')}
        onError={(error) => console.log('Chat error', error)}
      />
    </div>
  )
}

export default App

License

MIT © Joyjet

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago