When should usePress be used, given that useButton exists? #3314
-
Hey there, amazing library + documentation! I'm curious about what the use case is for Could someone give some advice around what the appropriate use cases are for Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Good question! It usually wouldn't be used by itself, but more likely would be used for handling press interaction within other ARIA patterns. For instance, a radio button requires press interaction, but doesn't have button semantics, so our If you search the codebase for |
Beta Was this translation helpful? Give feedback.
Good question! It usually wouldn't be used by itself, but more likely would be used for handling press interaction within other ARIA patterns. For instance, a radio button requires press interaction, but doesn't have button semantics, so our
useRadio
hook uses it.If you search the codebase for
usePress
, you'll see where it gets used within other hooks.