System:
OS: macOS 14.5
CPU: (10) arm64 Apple M1 Pro
Memory: 1.07 GB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 9.6.7 - ~/.nvm/versions/node/v18.17.0/bin/npm
Watchman: 2023.09.04.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.1 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
Android SDK:
API Levels: 23, 26, 27, 28, 29, 30, 31, 33, 34
Build Tools: 30.0.3, 31.0.0, 33.0.0, 33.0.1, 34.0.0
System Images: android-26 | Google APIs ARM 64 v8a, android-29 | Google APIs ARM 64 v8a, android-30 | Google APIs ARM 64 v8a, android-31 | Google Play ARM 64 v8a, android-33 | Google APIs ARM 64 v8a, android-34 | Google APIs ARM 64 v8a
Android NDK: 23.1.7779620
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10811636
Xcode: 15.0/15A240d - /usr/bin/xcodebuild
Languages:
Java: 11.0.19 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.72.6 => 0.72.6
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Issue
When navigating between different threads from the Pinned Messages tab, the Thread component occasionally displays messages from the previously viewed thread instead of the newly selected thread. This issue occurs intermittently (approximately 5 out of 10 times) even when using
closeThreadOnDismount={true}on the Thread component.The problem appears to be related to thread state not being properly cleared or the Channel component not re-mounting with the correct thread data when navigating between threads.
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
Each time a different thread is selected from the Pinned Messages tab, the ThreadDetailScreen should display the messages for the newly selected thread, not the previously viewed one.
Project Related Information
Customization
Click To Expand
The Thread component is used within a Channel component with the following configuration:
Offline support
Environment
Click To Expand
package.json:{ "dependencies": { "stream-chat-expo": "^5.4.3", "stream-chat-react-native-core": "^5.4.3", // ... other dependencies } }react-native infooutput:stream-chat-react-nativeversion you're using that has this issue:5.4.3(via stream-chat-expo)iOS 17.0,Android 13iPhone 14 Pro,Samsung Galaxy S22Additional context
This issue persists even after implementing workarounds such as adding a
keyprop to the Channel component to force re-mounting when the thread changes. The intermittent nature suggests a race condition or caching issue within the Thread component's state management.Screenshots
Click To Expand
No screenshots available at this time.