MCPcopy Index your code
hub / github.com/react-native-webview/react-native-webview / processDecelerationRate

Function processDecelerationRate

src/WebView.ios.tsx:19–29  ·  view source on GitHub ↗
(
  decelerationRate: DecelerationRateConstant | number | undefined,
)

Source from the content-addressed store, hash-verified

17
18const resolveAssetSource = (source: ImageSourcePropType) => Image.resolveAssetSource(source);
19const processDecelerationRate = (
20 decelerationRate: DecelerationRateConstant | number | undefined,
21) => {
22 let newDecelerationRate = decelerationRate;
23 if (newDecelerationRate === 'normal') {
24 newDecelerationRate = 0.998;
25 } else if (newDecelerationRate === 'fast') {
26 newDecelerationRate = 0.99;
27 }
28 return newDecelerationRate;
29};
30
31// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
32const useWarnIfChanges = <T extends unknown>(value: T, name: string) => {

Callers 1

WebView.ios.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…