PHP 7.4.33
Preview: useAnimatedValue.js Size: 646 B
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/react-native/Libraries/Animated/useAnimatedValue.js
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow strict-local
 * @format
 */

import type {AnimatedValueConfig} from './nodes/AnimatedValue';

import Animated from './Animated';
import {useRef} from 'react';

export default function useAnimatedValue(
  initialValue: number,
  config?: ?AnimatedValueConfig,
): Animated.Value {
  const ref = useRef<null | Animated.Value>(null);
  if (ref.current == null) {
    ref.current = new Animated.Value(initialValue, config);
  }
  return ref.current;
}

Directory Contents

Dirs: 3 × Files: 19
Name Size Perms Modified Actions
- drwxr-xr-x 2025-03-28 11:04:42
Edit Download
- drwxr-xr-x 2025-03-28 11:04:42
Edit Download
nodes DIR
- drwxr-xr-x 2025-03-28 11:04:42
Edit Download
18.43 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
1.57 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
7.08 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
20.19 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
5.29 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
276 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1021 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
4.07 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
3.24 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.12 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
6.15 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
3.07 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
424 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
444 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
439 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
2.32 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
11.88 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
362 B lrw-r--r-- 2025-03-28 11:04:43
Edit Download
646 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).