chatscope / use-chat

React hook for state management in chat applications.

Home Page:https://chatscope.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation

supersnager opened this issue · comments

Prepare documentation.

If you are interested in this library and need more documentation,
please let me know by adding one of the positive reactions (+1, Heart, Rocket) to this issue :)

commented

It's a great library! I run a market place website and really want to replace my current chat app with this. More documentation would be great, as it's quite confusing how to hook it up to a real API.

Cheers

@baj84 I'm glad you like it :) What API library do you use?

@supersnager i am using this in my react app and it had many issues which just a little but of reading documentation i solved it but the issue is with ExampleChatService.
when i use it it does not give any error but in actuality there is no thing as ExampleChatService in the package.
I like the library but i cannot go ahead if i dont this.

Also is there any alternatives to ExampleChatService.
and i dont fully understand the library yet so if this looks silly dont mind 👍🏻 :)

@zakim2307 Thank you for your question.

ExampleChatService is available in package. You can import it here:

import {ExampleChatService} from "@chatscope/use-chat/dist/examples";

The source of ExampleChatService is available here: https://github.com/chatscope/use-chat/blob/main/src/examples/ExampleChatService.ts

However, please note that this is only an example and should be taken as a starting point for implementing your own service.
Please also check the comments in the ExampleChatService.ts source - it can help a little.

I'm currently working on a simple chat server (nodejs) and adapter (service) for it. Based on this I will write a tutorial about how to make your own adapters.
Also in the next steps, I'll write ready-to-use adapters for some chat API providers.

So please be patient the documentation is under construction and will be available with examples soon.

hey @supersnager thank a lot for the quick reply...
when i was using the example(given by yourself) i was able to run chat app smoohly but when i installed the package in my project i am not able to see the example folder.
and i tried to downgrade the useChat package but it was the same(could not locate ExampleChatService.js
if you could see in the attachment there is no folder called example.

Once again thanks for quick reply and once again i know that it should be only for example but i need it to understand how your package is working and how i could write my own set of code for the service....

Also i will be looking forward to the finished documentation

Screenshot 2021-09-28 at 15 32 05

s)

hey @supersnager i made it work but i think that how i did was not the best thing so i will be waiting for your documentation man and you have made a great library man it could go to heights if you give more features in it but most important i think is documentation itself.

hi there @supersnager how can i send attachments through the app i cannot see any options in the documentation

sorry @supersnager i found out how to send attachments

amazing library!

Amazing! I believe this library would be able to save me from my project.
This library would enable me to build a chatapp without a server?

Can I get the source code of this demo?
https://demo.chatscope.io/login

@joshlpaige

This library would enable me to build a chatapp without a server?

No, you can't build a chat app without a server (to be honest you can do it, using WebRTC, but it won't be very usable :) ).

Can I get the source code of this demo?
https://demo.chatscope.io/login

No, for now. For an explanation, please refer to the Help -> FAQ section of the demo.

Hello, @supersnager
I am trying to add conversastions with fetching data from api.
I tried like this
image
of course, this can't be working :)
how can I implement this?