Skip to content

Conversation

langleyd
Copy link
Member

@langleyd langleyd commented Oct 8, 2025

What's in this PR?

It adds the RoomViewStore to the constructor of RoomView and add's it to the RoomView state which in turn is used as the RoomContext. This means the RoomViewStore can be accessed from the RoomContext within the component hierarchy of the RoomView.. This is needed if are to support multiple RoomViews/RoomViewStores(instead of the singleton RoomViewStore).

A second PR will follow that updates the usages of the RoomViewStore within the RoomView sub-components to use the one from the RoomContext.


const llMembers = context.client.hasLazyLoadMembersEnabled();
this.state = {
roomViewStore: props.roomViewStore,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why putting the store in the state? You can use this.props.roomViewStore in the component

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the state is used as the RoomContext, example here.

I have updated the PR description to provide better context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants