open-index/open-npm huggingface dataset:
npm package: @samparkchat/sampark-chat
Description: [SamparkChat] is a chat service SDK designed for seamless integration into applications, providing real-time messaging functionality. It support text-based interactions. Developers can easily integrate it into their apps, using SamparkChatProvider to mana
Latest version: 0.0.6

# sampark-chat



## Getting started

[SamparkChat] is a chat service SDK designed for seamless integration into applications, providing real-time messaging functionality. It support text-based interactions. Developers can easily integrate it into their apps, using SamparkChatProvider to manage chat functionalities.

The SDK is developed with TypeScript and offers strong type safety, making it a robust option for mobile platforms. It focuses on delivering a scalable chat experience, suitable for different use cases such as customer support, social interactions, and team collaboration.

Key features of SamparkChat include:

- [ ] Real-time messaging using Socket.IO.
- [ ] UI components.
- [ ] TypeScript support for type safety and better development experience.
- [ ] Scalability for handling large user bases.
- [ ] Integration with the broader Sampark UI kit.
It can be paired with the SamparChat for a cohesive user experience across different aspects of an application.

## Sample app
Follow these instructions to set up a simple chat app using SamparkChat.
Add the SamparkChat TypeScript SDK and React framework packages to your project:
```
npm i @samparkchat/sampark-chat
npm i socket.io-client
npm i axios

```
Replace the contents of src/App.js with the following, replacing myAppId and mySecretKey with your own keys:

```
import React from 'react';
import { SamparkChatProvider, SamparkChat, SamparkChatScreen } from '@samparkchat/sampark-chat';

function App(): React.JSX.Element {
  const users = [
    { id: 'User002', name: 'DummyUser' },
  ];
  
  const appId = 'your-app-id';
  const secretKey = 'your-app-secret';
  const Sampark = new SamparkChat(appId, secretKey);

  return (
      <SamparkChatProvider client={Sampark}>
        <SamparkChatScreen users={users} client={Sampark} userId={'User001'} userName={'UserName'} />
      </SamparkChatProvider>
  );
}

export default App;
```