File tree Expand file tree Collapse file tree
packages/react-native-gesture-handler/src/v3/hooks/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,6 +142,11 @@ function remapProps<
142142 return config ;
143143}
144144
145+ const DEFAULT_PROPS_MAPPING = new Map < string , string > ( ) ;
146+ const DEFAULT_PROPS_TRANSFORMER = < TConfig extends object > (
147+ config : TConfig
148+ ) : TConfig => config ;
149+
145150export function useClonedAndRemappedConfig <
146151 TConfig extends Record < string , unknown > ,
147152 THandlerData ,
@@ -151,8 +156,10 @@ export function useClonedAndRemappedConfig<
151156 config : ExcludeInternalConfigProps <
152157 BaseGestureConfig < TConfig , THandlerData , TExtendedHandlerData >
153158 > ,
154- propsMapping : Map < string , string > = new Map ( ) ,
155- propsTransformer : ( config : TInternalConfig ) => TInternalConfig = ( cfg ) => cfg
159+ propsMapping : Map < string , string > = DEFAULT_PROPS_MAPPING ,
160+ propsTransformer : (
161+ config : TInternalConfig
162+ ) => TInternalConfig = DEFAULT_PROPS_TRANSFORMER
156163) : BaseGestureConfig < TInternalConfig , THandlerData , TExtendedHandlerData > {
157164 return useMemo ( ( ) => {
158165 const clonedConfig = cloneConfig <
You can’t perform that action at this time.
0 commit comments