Skip to content

DropdownMenuItem and ContextMenuItem VS just MenuItem #992

Answered by benoitgrelard
buffaybu asked this question in Help
Discussion options

You must be logged in to vote

hi @buffaybu,

We do this by design for a few reasons:

  1. There are sometimes accessibility differences which warrant differences for each uses case, we may realise this later down too.
  2. Having a unified API for each component reduces breaking changes down the line as it gives us more freedom to make changes in specific implementations without impacting other primitives.
  3. DX is better for first time use and less experienced developers as they get all the parts from one package.

In the case of DropdownMenuItem and ContextMenuItem, you are correct that they are mostly equivalent and extend our internal MenuItem. In fact, before the introduction of context scoping (#906) they were the same. That…

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
2 replies
@buffaybu
Comment options

@benoitgrelard
Comment options

Answer selected by buffaybu
Comment options

You must be logged in to vote
7 replies
@buffaybu
Comment options

@buffaybu
Comment options

@benoitgrelard
Comment options

@jjenzz
Comment options

@buffaybu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants