1 | /**
|
2 | * Actually a uid function - call with any argument
|
3 | * @returns {String}
|
4 | * @see {@link uid}
|
5 | */
|
6 | declare type SeedGenerator = (id: any) => string;
|
7 | /**
|
8 | * returns and unique id. SSR friendly
|
9 | * returns {String}
|
10 | * @see {@link UIDConsumer}
|
11 | * @see https://github.com/thearnica/react-uid#hooks-168
|
12 | * @example
|
13 | * const id = useUID();
|
14 | * id == 1; // for example
|
15 | */
|
16 | export declare const useUID: () => string;
|
17 | /**
|
18 | * returns an uid generator
|
19 | * @see {@link UIDConsumer}
|
20 | * @see https://github.com/thearnica/react-uid#hooks-168
|
21 | * @example
|
22 | * const uid = useUIDSeed();
|
23 | * return (
|
24 | * <>
|
25 | * <label for={seed('email')}>Email: </label>
|
26 | * <input id={seed('email')} name="email" />
|
27 | * {data.map(item => <div key={seed(item)}>...</div>
|
28 | * </>
|
29 | * )
|
30 | */
|
31 | export declare const useUIDSeed: () => SeedGenerator;
|
32 | export {};
|