react-native-macos/Libraries/Pressability
Tim Yung 9da4d87798 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
2020-09-28 17:23:49 -07:00
..
__tests__ Pressability: Remove Default Press Delay 2020-09-10 17:04:26 -07:00
HoverState.js Migrate large amount of modules to flow strict and strict-local 2020-07-22 09:46:16 -07:00
Pressability.js Pressability: Consistently Fire `onPress{In,Out}` w/o `onPress` 2020-09-10 17:04:26 -07:00
PressabilityDebug.js Make ColorValue public in StyleSheet.js 2020-04-17 13:03:47 -07:00
usePressability.js Pressability: Support Lazy Hook Initialization 2020-09-28 17:23:49 -07:00