queryCreator not working for createGroupChannelFragment with sendbird/uikit-react-native@2.3.0

when I am trying to add queryCreator to include parentMessage and reactions, the app is getting crashed on the chat screen with createGroupChannelFragment

[Reproduction Steps]

const GroupChannelListFragment = createGroupChannelFragment()

//TRIAL-1:  tried this not working
  const query = PreviousMessageListQuery();
query.includeParentMessageInfo: true

//TRIAL-2:  tried this not working
const customQuery = {
    query.includeParentMessageInfo: true
  return query
 // queryCreator={customQuery }
 // queryCreator={query }
  // queryCreator={
  //   new PreviousMessageListQuery({
  //     limit: 30,
  //     includeReactions: true,
  //     includeParentMessageInfo: true,
  //   })
  // }
  //render item
  renderMessage={({message}) => {
    return <RenderItem message={message}/>

everytime - high

  const listQuery = activeChannel.createPreviousMessageListQuery();

  const customQuery = () => {
    listQuery.includeReaction = true;
    listQuery.includeParentMessageInfo = true;
    return listQuery;

tried this but ParentMessageInfo were null and empty, its not even showing and message lists are loading everytime after sending a message

this is working, thank you.

  const createPreviousMessageListQuery = () => {
    let listQuery = activeChannel?.createPreviousMessageListQuery();
    listQuery.limit = 20;
    listQuery.reverse = false;
    listQuery.includeMetaArray = true;
    listQuery.includeReaction = true;
    listQuery.replyType = 'all';
    listQuery.includeThreadInfo = true;
    listQuery.includeParentMessageInfo = true;
    listQuery.isLoading = false;

    return listQuery;


but messages(entire chat screen) is loading every time, when i send a message :frowning:

You might want to experiment with wrapping createPreviousMessageListQuery() in a useCallback or pull it out of your component all together so it’s not recreating the function each time your component state changes (i.e. when you send/receive a message)