1.9.0 • Published 2 years ago
@widgetbot/react-embed v1.9.0
react-embed
import * as React from 'react'
import WidgetBot, { API } from '@widgetbot/react-embed'
class App extends React.Component {
api: API
onAPI(api: API) {
this.api = api
api.on('signIn', user => {
console.log(`Signed in as ${user.name}`, user)
})
}
handleClick() {
this.api.emit('sendMessage', `Hello world! from \`@widgetbot/react-embed\``)
}
render() {
return (
<div>
<button onClick={this.handleClick.bind(this)}>
{`Send "Hello world"`}
</button>
<WidgetBot
server="299881420891881473"
channel="355719584830980096"
onAPI={this.onAPI.bind(this)}
/>
</div>
)
}
}
export default App
1.8.2
2 years ago
1.9.0
2 years ago
1.8.1
2 years ago
1.8.0
2 years ago
1.7.0
2 years ago
1.6.1
3 years ago
1.6.0
3 years ago
1.5.0
3 years ago
1.4.1
3 years ago
1.4.0
4 years ago
1.3.0
5 years ago
1.2.2
5 years ago
1.2.1
7 years ago
1.2.0
7 years ago
1.1.3
7 years ago
1.1.2
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.0.9
7 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago