From cdd1b295617d24ea28f788a5be3bd3e63f7139bd Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Thu, 17 Nov 2016 10:17:37 -0800 Subject: [PATCH] revert uid generation, but increase randomness --- package.json | 3 ++- src/utils/uid.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c1f695693..9d380f7ff 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "keycode": "^2.1.2", "lodash": "^4.13.1", "type-of": "^2.0.1", - "ua-parser-js": "^0.7.10" + "ua-parser-js": "^0.7.10", + "uid": "0.0.2" }, "peerDependencies": { "react": "^0.14.0 || ^15.0.0", diff --git a/src/utils/uid.js b/src/utils/uid.js index 1960489db..8a16262a6 100644 --- a/src/utils/uid.js +++ b/src/utils/uid.js @@ -1,5 +1,5 @@ -let N = 0 +import generate from 'uid' /** * Create a unique identifier. @@ -8,7 +8,7 @@ let N = 0 */ function uid() { - return String(N++) + return generate(10) } /**