UNPKG

@awsui/components-react

Version:

On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en

15 lines 475 B
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 import { useRef } from 'react'; export function useDateCache() { const cacheRef = useRef(new Map()); return (date) => { const current = cacheRef.current.get(date.getTime()); if (current) { return current; } cacheRef.current.set(date.getTime(), date); return date; }; } //# sourceMappingURL=index.js.map