const useSendMessage = (): ??? => {
const dispatch = useDispatch();
return useCallback(
(id: number, message: Message) => {
dispatch(Operation.sendMessage(id, message));
},
[dispatch]
);
};
const useSendMessage = (): (id: number, message: Message) => void => {
const dispatch = useDispatch();
return useCallback(
(id: number, message: Message) => {
dispatch(Operation.sendMessage(id, message));
},
[dispatch]
);
};