Skip to content

Conversation

@earth9890
Copy link
Member

…ntionPlugin components

Description

Screenshots | Video with voice-over

Link to Figma (If applicable)

How has this been tested?

Checklist:

  • My code is tested
  • Screenshot added in PR
  • Figma design linked
  • My code follows accessibility standards
  • My code has proper inline documentation
  • I have resolved all lint issues
  • My templates are responsive
  • I've added conditional class names use cn()
  • I've followed theme color usage
  • I have used clear and relevant file paths

type TMenuComponent,
type TMenuItemComponent,
} from './mention-plugin/mention-plugin';
import MentionNode from './mention-plugin/mention-node';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What: Ensure that the memoization of initialConfig does not lead to stale values due to dependencies not being included.

Why: Memoization can cause the configuration to retain old values if dependencies are not carefully managed, which could lead to unexpected behavior in the component.

How: Ensure that all relevant state and props that could change and are used in initialConfig are included in the dependency array of useMemo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants