1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 19:01:54 +02:00

Use incrementing number to generate keys

This commit is contained in:
Soreine
2016-11-14 10:19:07 +01:00
parent b0c72c7d34
commit c598c22538
2 changed files with 2 additions and 5 deletions

View File

@@ -18,8 +18,7 @@
"keycode": "^2.1.2", "keycode": "^2.1.2",
"lodash": "^4.13.1", "lodash": "^4.13.1",
"type-of": "^2.0.1", "type-of": "^2.0.1",
"ua-parser-js": "^0.7.10", "ua-parser-js": "^0.7.10"
"uid": "0.0.2"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^0.14.0 || ^15.0.0", "react": "^0.14.0 || ^15.0.0",

View File

@@ -1,6 +1,4 @@
import generate from 'uid'
let N = 0 let N = 0
/** /**
@@ -10,7 +8,7 @@ let N = 0
*/ */
function uid() { function uid() {
return (N++) + generate(4) return String(N++)
} }
/** /**