@lskjs/chat
TypeScript icon, indicating that this package has built-in type declarations

2.8.0 • Public • Published

LSK CHAT

React components for internationalization

LSK logo NPM version Package size License LSK Chat on Telegram

Just press on t and take a result from @lskjs/chat. Or in reverse.

Installation and usage

The easiest way to use is to install it from npm and build it into your app with Webpack.

npm install @lskjs/chat

Then use it in your app:

import Chat from '@lskjs/chat';

    class ChatComponent extends React.Component {
  state = {
    messages: [],
  };

  constructor() {
    super();
    serverMessages.forEach((serverMessage) => {
      const { messages } = this.state;
      const timeout = serverMessage.createdAt - Date.now();
      setTimeout(() => {
        // this.state.messages.push(serverMessage);
        this.setState({
          messages: [...messages, serverMessage],
        });
      }, timeout);
    });
  }
  render() {
    const { messages } = this.state;
    return <Chat items={messages} userId={2} />;
  }
}


export default ({ storiesOf }) => {
  return storiesOf('chat/Chat').add('Chat', () => (
    <Story>
      <ChatComponent />
    </Story>
  ));
};

For more examples and usage, please refer

Examples

See the more examples in Storybook.

More info

Links

Contact

Contributors ✨


Igor Suvorov

💻 🎨 🤔

Thanks goes to these wonderful people (emoji key):

License

This project is licensed under the MIT License - see the LICENSE file for details

Inspired by

  • i18next
  • mobx
  • mobx-provider

Contributing

  1. Fork it (https://github.com/yourname/yourproject/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.8.016latest

Version History

VersionDownloads (Last 7 Days)Published
2.8.016
2.7.59
2.7.00
2.6.32
2.5.32
2.5.23
2.5.11
2.4.0-beta.10
2.3.0-beta.150
2.3.0-beta.170
2.3.0-beta.100
2.3.0-beta.60
2.3.0-beta.40
2.0.0-beta.20
1.36.102
1.34.21
1.34.12
1.33.02

Package Sidebar

Install

npm i @lskjs/chat

Weekly Downloads

40

Version

2.8.0

License

MIT

Unpacked Size

80.5 kB

Total Files

24

Last publish

Collaborators

  • lskjsru
  • maxxborer
  • isuvorov
  • yukioru
  • andru_xa
  • natavts
  • blacklightburn
  • ga2mer
  • kafkae
  • sophiyabezruk
  • vladik_deniska
  • finalgetname