Generates a unique id.
Parameters:
Name | Type | Description |
---|---|---|
prefix | string | Prefix to added to the generated unique id. |
- Since
- 1.0.0
- Source
Returns:
Returns a unique Id, prepended with the speficied prefix.
- Type:
- string
Example
import { uniqueId } from "@gravityforms/utils";
function Example() {
const id = uniqueId( 'gform' );
}