Search messages the current user has access to
import { thread } from '@cord-sdk/react';
const results = thread.useSearchMessages({textToMatch: 'hello'});
return (
<div>
{results.map((result) => (
<div key={result.id}>
Found match in message {result.id}: {result.plaintext}
</div>
))}
</div>
);
undefined
while the data loads from our API. Once it has loaded, your component will re-render and the hook will return an array containing message objects including thread location.limit
option to override that. To get more specific results, consider using one or more of the other search options provided.This is an object with the following fields:
Show property details
Not finding the answer you need? Ask our Developer Community