Fix for issue: https://linear.app/comm/issue/ENG-1489/web-app-was-not-loading-properly-error-with-chatmessagelistcontainer
Moved activeChatThreadID selector one level higher in components tree to conditionally render ChatMessageListContainer and avoid need to further modifications inside, as the component was designed with assumption that activeChatThreadID always exists.
Details
Details
Register new user in app. Don't enter any thread on mobile. After opening chat in web app, the issue described in Linear task no longer appears.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Branch
- jacek/web-no-thread-issue
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
web/chat/chat.react.js | ||
---|---|---|
14–21 | What is the reason behind introducing this memo? |
web/chat/chat.react.js | ||
---|---|---|
14–21 | To avoid re-rendering ThreadListProvider when activeChatThreadID changes, as the Chat component will be re-rendered more often now. (Although I suppose the ThreadListProvider would also be re-rendered even inside Memo, as it also uses activeChatThreadID.) |
Comment Actions
This makes sense. Thanks for being thorough in your logic in the Linear issue, made this diff easier to review.