i installed react-mentions I did not discover how to use it, and all I found was an explanation of how to use it with data stored in the same project, (fake data)
And I want to know how to use it with real data that is fetched from a database from MongoDB
It is assumed that as soon as I type @, the system reviews username suggestions, or when I type a letter after it, it suggests usernames that starts with this letter.
but when i type @ nothing happened
Note: I am trying to call the data in Mentions component and then I try to call its input in another component and use it
i installed react-mentions I did not discover how to use it, and all I found was an explanation of how to use it with data stored in the same project, (fake data)
And I want to know how to use it with real data that is fetched from a database from MongoDB
It is assumed that as soon as I type @, the system reviews username suggestions, or when I type a letter after it, it suggests usernames that starts with this letter.
but when i type @ nothing happened
Note: I am trying to call the data in Mentions component and then I try to call its input in another component and use it
and this is the code I tried:
Mentions.jsx
This is the textarea that I'm trying to make it use the function I wrote in Mentions Component The textarea exists in another component
CreatePost.jsx
Observed behaviour:
Workaround: