/*! * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the Microsoft Live Share SDK License. */ import { IUseSharedMapResults, SharedMapInitialData } from "../types"; /** * React hook for using a Fluid `SharedMap`. * * @remarks * The primary benefit of using the `useSharedMap` hook rather than the Fluid `SharedMap` * directly is that it integrates nicely with React state and automates repetitive tasks. * If you want to use `SharedMap` this hook creates directly, you can do that as well. * This hook can only be used in a child component of `` or ``. * * @template TData Optional typing for objects stored in the SharedMap. Default is `any` type. * @param uniqueKey the unique key for the `SharedMap`. If one does not yet exist, a new `SharedMap` * will be created, otherwise it will use the existing one. * @param initialData a JS Map, entries array, or JSON object to insert into the `SharedMap` when creating * the DDS for the first time. * @returns stateful `map` entries, `setEntry` callback, `deleteEntry` callback, and the Fluid `sharedMap`. */ export declare function useSharedMap(uniqueKey: string, initialData?: SharedMapInitialData): IUseSharedMapResults; //# sourceMappingURL=useSharedMap.d.ts.map