Skip to content

Podchatweb is an web app built by react for handling POD chating use cases

License

Notifications You must be signed in to change notification settings

ACT1GMR/podchatweb

Repository files navigation

Podchatweb

Podchatweb is a web app built by react for handling POD chating use cases

Preview of Podchat web

Development

npm run start

Installation

npm install podchatweb --save

Usage

React component:

import {PodchatReact} from "podchatweb"

class MyApp extends Component {
    render() {
        const {token} = this.props;
        return 
        <div>
            <PodchatReact token={token} onTokenExpire={callBack => {callBack(token)}}/>
        </div>
    }
}

Programmatic calling:

Module loader:

import {Podchat} from "podchatweb"

class MyApp extends Component {

    componentDidMount() {
        const {token} = this.props;
        Podchat({token}, "myChat")
    }
    
    render() {
        return <div id="myChat"/>
    }
}

Old school:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="dist/index.js"/>
</head>

<body>
<div id="app"></div>
<script>
var podchat = Podchat({token: "YOUR_TOKEN"}, "app");
//GOT NEW TOKEN
podchat.setToken("YOUR_NEW_TOKEN");
</script>
</body>
</html>

License

This project is open-sourced software licensed under the MIT license.

About

Podchatweb is an web app built by react for handling POD chating use cases

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •