/
psyhack
/
chat-app
Обзор
Документация
Войти
/
psyhack
/
chat-app
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/store/asyncActions/message.ts
27 строк
719 B
sanchine
load project
19 июн 2024, 16:50
Не верифицирован
19 июн 2024, 16:50
3b45049
Код
Авторство
О чём код?
import AsyncStorage from "@react-native-async-storage/async-storage"; import { chatApi } from "../../api/chatApi"; import { newMessageAdded } from "../reducers/chat"; export const startMessagesListening = () => async (dispatch) => { chatApi.start(dispatch) } export const stopMessagesListening = () => async (dispatch) => { // chatApi.unsubscribe(newMessageHandlerCreator(dispatch)) chatApi.stop() } export const sendMessage = (message) => async (dispatch) => { chatApi.sendMessage(message) } // export const sendChatStatus = (status) => async (dispatch) => { // chatApi.sendMessage(status) // } // export const sendReadMessage = (status) => async (dispatch) => { // chatApi.sendMessage(status) // }