Skip to content

Commit 4ab08cb

Browse files
committed
docs: update README to clarify MentionInput and textValue references
1 parent c7fa91a commit 4ab08cb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ Unique id for each suggestion.
371371

372372
`name: string`
373373

374-
Name that will be shown in `MentionInput` when user will select the suggestion.
374+
Name that will be shown in your `TextInput` when user will select the suggestion.
375375

376376
### Type `TriggerData`
377377

@@ -400,7 +400,7 @@ The extracted id - `123`
400400
/({([^{^}]*)}\[([^[]*)]\(([^(^)]*)\))/i
401401
```
402402

403-
### `MentionInput` component props
403+
### Deprecated `MentionInput` component props
404404

405405
If you prefer to use class component without hooks the `MentionInput` is for you.
406406

@@ -420,14 +420,14 @@ For detailed migration instructions from v2 to v3, please see [MIGRATION.md](./M
420420

421421
## Parsing Mention's Value
422422

423-
You can import RegEx that is using in the component and then extract all your mentions
424-
from `MentionInput`'s value using your own logic.
423+
You can import RegEx that is using in the component and then extract all mentions
424+
from `textValue` using your own logic.
425425

426426
```ts
427427
import { triggerRegEx } from 'react-native-controlled-mentions';
428428
```
429429

430-
Or you can use `replaceTriggerValues` helper to replace all mentions from `MentionInput`'s input using
430+
Or you can use `replaceTriggerValues` helper to replace all mentions from `textValue` using
431431
your replacer function that receives [TriggerData](#type-triggerdata) type and returns string.
432432

433433
```ts
@@ -485,8 +485,8 @@ const renderPart = (part: Part, index: number) => {
485485
/**
486486
* Value renderer. Parsing value to parts array and then mapping the array using 'renderPart'
487487
*
488-
* @param value - value from MentionInput
489-
* @param configs - configs array that you providing to MentionInput
488+
* @param value - `textValue` that you're getting from the `useState` hook
489+
* @param configs - configs array that you providing to the `useMentions` hook
490490
*/
491491
const renderValue: FC = (value: string, configs: Config[]) => {
492492
const { parts } = parseValue(value, configs);

0 commit comments

Comments
 (0)