-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pressability: Support Lazy Hook Initialization
Summary: Changes `usePressability` so that it accepts a nullable `config` argument. This makes it possible for a component to use `usePressability` and lazily allocate the `config` and subsequent instance of `Pressability`. This can be useful for components that are commonly allocated but seldom pressed because it lets many usages of `usePressability` avoid allocating many extraneous objects. Changelog: [Internal] Reviewed By: kacieb Differential Revision: D23708206 fbshipit-source-id: 4a5063067131ce8c957fb16c49a2045e8c0b19fa
- Loading branch information
1 parent
0a0d2c9
commit 9da4d87
Showing
2 changed files
with
26 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters