scalableminds / chatroom

React-based Chatroom Component for Rasa Stack
https://npm-scalableminds.s3.eu-central-1.amazonaws.com/@scalableminds/chatroom@master/demo.html
GNU Affero General Public License v3.0
307 stars 208 forks source link

How to Run it in React App? #168

Open hadisd5 opened 3 years ago

hadisd5 commented 3 years ago

I want to know how to run this chatbox as a component in react I also installed his library but nothing happens

import Chatroom from "@scalableminds/chatroom"
import React, { Component } from 'react'

export default class App extends Component {
  render() {
    return (
      <div>
        <Chatroom />
      </div>
    )
  }
}
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `App`.