Lodash _.uniqueId() Method
The Lodash _.uniqueId() method is used to create an unique id for some element each time. This method will work for the purpose of assigning a unique id for most use cases, but not with complex projects that require a unique id always even if the project restarts.
Parameters: This method accepts a single parameter as mentioned above and described below:
- prefix: The value to prefix the ID with.
Return Value: This method returns the string unique ID.