Master react (#19439)

chore(react): react rc3 release
This commit is contained in:
Ely Lucas
2019-09-24 11:52:12 -06:00
committed by GitHub
parent e90e960294
commit 61f04e50b1
15 changed files with 71 additions and 39 deletions

View File

@ -3,7 +3,7 @@ export const isDevMode = () => {
};
export const deprecationWarning = (message: string) => {
if(isDevMode()) {
if (isDevMode()) {
console.warn(message);
}
};

View File

@ -0,0 +1,3 @@
let count = 0;
export const generateId = () => (count++).toString();

View File

@ -1,8 +0,0 @@
export const generateUniqueId = (length: number = 10) => {
const charPool = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
const charArray: string[] = [];
for(let i = 0; i < length; i++) {
charArray.push(charPool[Math.floor(Math.random() * charPool.length)]);
}
return charArray.join('');
};

View File

@ -1,2 +1,2 @@
export * from './generateUniqueId';
export * from './generateId';
export * from './dev';