LiveLists

React.JS Hooks

useChannel

const { join, publishMessage, recentMessages, historyMessages, connectionState, isLoadingHistory, loadMoreMessages, scrollToBottomKey, initialScroll, readMessage, onFindFirstNotSeen, subscribe, publishEvent, onSubscribeEvent, unSubscribeEvent, notSeenCount, channelInfo, } = useChannel({ channelId: selectedChannelId, wsConnector, initialPageSize: 1, initialOffset: 20, });

useChannel.ts

useChannelsAggregation

const { loadChannels, channels, } = useChannelsAggregation({ wsConnector: ws, });

useChannelsAggregation.ts

useShortChannel

const { channel, } = useShortChannel({ channel });

useShortChannel.ts

useWsConnection

const { onGetConnection, } = useWsConnection({ url: 'wss://livelists.tech/livelists-ws/', accessToken, });

useWsConnection.ts