@scalemule/chat 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.cjs CHANGED
@@ -34,11 +34,9 @@ function useConnection() {
34
34
  react.useEffect(() => {
35
35
  return client.on("reconnecting", () => setStatus("reconnecting"));
36
36
  }, [client]);
37
- return {
38
- status,
39
- connect: () => client.connect(),
40
- disconnect: () => client.disconnect()
41
- };
37
+ const connect = react.useCallback(() => client.connect(), [client]);
38
+ const disconnect = react.useCallback(() => client.disconnect(), [client]);
39
+ return { status, connect, disconnect };
42
40
  }
43
41
  function useChat(conversationId) {
44
42
  const { client } = useChatContext();
package/dist/react.js CHANGED
@@ -33,11 +33,9 @@ function useConnection() {
33
33
  useEffect(() => {
34
34
  return client.on("reconnecting", () => setStatus("reconnecting"));
35
35
  }, [client]);
36
- return {
37
- status,
38
- connect: () => client.connect(),
39
- disconnect: () => client.disconnect()
40
- };
36
+ const connect = useCallback(() => client.connect(), [client]);
37
+ const disconnect = useCallback(() => client.disconnect(), [client]);
38
+ return { status, connect, disconnect };
41
39
  }
42
40
  function useChat(conversationId) {
43
41
  const { client } = useChatContext();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalemule/chat",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "ScaleMule standalone chat SDK — real-time messaging, presence, typing indicators",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",