UNPKG

communication-react-19

Version:

React library for building modern communication user experiences utilizing Azure Communication Services (React 19 compatible fork)

16 lines 490 B
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { useMemo } from 'react'; /** * Shallow merge two objects and return a memoized result. * * @private */ export function useShallowMerge(target, source) { const memoizedMerge = useMemo(() => (Object.assign(Object.assign({}, (target || {})), (source || {}))), [target, source]); if (!target && !source) { return undefined; } return memoizedMerge; } //# sourceMappingURL=merge.js.map