Skip to content

[data channel] loading is never defined as false when data channel is empty #118

Closed
bigbluebutton/bigbluebutton
#22048
@TiagoJacobs

Description

@TiagoJacobs

The below code always logs loading=true, however, the loading should become false when the initial data of this hook was received.

const currentSessionsDataChannel = pluginApi.useDataChannel<IndividualFeedbackSession>('running-sessions', DataChannelTypes.All_ITEMS);
useEffect( () => {
    console.log("currentSessionsDataChannel.data.loading", currentSessionsDataChannel.data.loading);
}, [currentSessionsDataChannel.data.loading]);

Looking the websocket traffic, I can see that data already arrived on browser:
image

PS: discussing with @GuiLeme he mentioned that a refactor is needed in BBB createUseSubscription function (see here), as it's not currently exposing the loading attribute.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions