Skip to content

Conversation

@khushal87
Copy link
Member

No description provided.

@Stream-SDK-Bot
Copy link
Contributor

Stream-SDK-Bot commented Oct 17, 2025

SDK Size

title develop branch diff status
js_bundle_size 291 KB 291 KB +423 B 🟡

import 'react-native-gesture-handler';
import { AppRegistry } from 'react-native';
import { enableScreens } from 'react-native-screens';
import './src/utils/bootstrapBackgroundMessageHandler';
Copy link
Contributor

Choose a reason for hiding this comment

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

Move this before RNGH and all of the other imports please, it's important that the very first thing encountered whenever App.tsx is hit is the bootstrapping

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
Copy link
Contributor

Choose a reason for hiding this comment

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

Please revert these changes when you can, they do not seem correct

const areEqual = (prevProps: MessagePropsWithContext, nextProps: MessagePropsWithContext) => {
const {
chatContext: { mutedUsers: prevMutedUsers },
deliveredBy: prevDeliveredBy,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be deliveredTo or deliveredToCount or something similar ?


export const MessageStatus = (props: MessageStatusProps) => {
const { message, readBy, threadList } = useMessageContext();
const { channel } = useChannelContext();
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're only really using the channel to see if the members length is greater than 2, perhaps we could precalculate this elsewhere and just pass it to be used as an atomic value ? That way we won't have to worry about unstable references changing (nor probably need to run useChannelContext() like this downstream (which will trigger many changes). Having it here pre-memoization is definitely an improvement but we can still move it outside since we were anyway never passing it as a prop so it isn't breaking either.

Copy link
Contributor

@isekovanic isekovanic left a comment

Choose a reason for hiding this comment

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

Apart from the couple of comments I don't have any other concrete objections ! We have to refactor the ChannelPreview at some point, it feels like it's slowly getting out of hand and it could use some love.

Please profile the PR on both platforms to make sure we aren't degrading performance further (it doesn't look like it at first glance, but let's be sure of it)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants