Whats the preffered way of storing it in db. #919
Replies: 1 comment 6 replies
|
To store mention data in a database when using the
const CustomMentionComponent = ({ trigger, value, data }) => {
const profileUrl = `/user/${data.userId}`; // Assuming 'data' contains 'userId'
return (
<a href={profileUrl} style={{ color: 'blue', textDecoration: 'underline' }}>
{trigger}{value}
</a>
);
};This approach allows you to maintain a clean separation of data and functionality, making it easier to manage and extend your application. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Uh oh!
There was an error while loading. Please reload this page.
So once mention has inserted, whats the preffered mode of saving the details in db ?
do we need to keep a separate mention table in db or how this can be done
my requirement is :
All reactions