useLatestMessage
Use the useLatestMessage
hook to get the latest thread message.
import {
useLatestMessage,
} from '@superinterface/react'
export const App = () => {
const { latestMessage } = useLatestMessage()
return (
<div>
{latestMessage?.id}
</div>
)
}
Arguments
No parameters available.
To modify variables passed to the mutation, use variables
field of <SuperinterfaceProvider>
or <Thread.Root>
.
To set other query options, use defaultOptions
from <SuperinterfaceProvider>
or <Thread.Root>
.
Returns
Here's a summary of useLatestMessage
return properties: