I am trying to when a column in my database changes pass down the column data of my database as props to another component to render. Why is it failing?

function RightFeed() {

const [posts, setPosts] = useState();

const { createdAt, updatedAt, read, sentImages, username } = useMoralisSubscription(

“Posts”,

(query) =>

query

  .descending("updatedAt"),

[],

{

live: true,

onUpdate: (data) => setPosts(data.map((data) => ({

  id: data.objectId,

  data: data.data,

})))

}

);

return (

<>

<div className={style.menuItem}>Chat</div>



<div className={style.chats}>

 {posts.map(({id, data: {createdAt, updatedAt, read, sentImages, username}}) =>

  <Chat

    key={id}

    id={id}

    createdAt={createdAt}

    updatedAt={updatedAt}

    read={read}

    sentImages={sentImages}

    username={username}

    />

    )} 

Listed is my code my project was loading correctly until I am getting to this live querying part and now the app is crashing prematurely and I can’t even see the specific errors. I am trying to make the useMoralisSubscription hook.