1.0.2 • Published 4 years ago

myra-chat-client v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

myra-chat-client

StrongSD@ Myra-Chat Client library

NPM JavaScript Style Guide

Install

npm install --save myra-chat-client

API

Modules:

  • [exportable, Class] Chat
    • init(config)
      • config.serviceURL: string, URL of node.js chat service
      • config.authToken: authorization token
  • [exportable, Component] ChatView
    • (props to describe here..)

Usage

import React, { Component } from 'react'
import Chat, { ChatView } from 'myra-chat-client'

class Example extends Component {
  componentDidMount() {
    Chat.init({
      serviceURL: 'https://.....',
      authToken: '<token>',
    });
  }
  render () {
    return (
      <ChatView />
    )
  }
}

License

MIT © yarikhenza