Skip to content

useMenuTrigger adds a lot to bundle size #2999

Answered by devongovett
susickypavel asked this question in Q&A
Discussion options

You must be logged in to vote

A few things we can improve here:

  • i18n support for useMenuTrigger includes translations for a string used as an accessibility description. I think it would be nice if (a) you could choose which languages you wish to support rather than always including all 30+, and (b) you could opt out of this string completely if you don't use long press support. I'm not sure exactly how to solve this without overcomplicating the API though. If you have ideas, please let us know!
  • It would be good to switch to a smaller i18n library. formatjs is quite feature rich, but large, and unnecessary in many cases. For example, in this case, the i18n messages don't do any fancy formatting (e.g. pluralization), s…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@chungwu
Comment options

@devongovett
Comment options

@devongovett
Comment options

@chungwu
Comment options

Answer selected by susickypavel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants