We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d16636 commit 7452dc7Copy full SHA for 7452dc7
src/utils.js
@@ -71,8 +71,10 @@ export function extractTextFromElement(element) {
71
export function cloneElement(element, children) {
72
const tag = element.type;
73
const props = exclude(element.props, ['children']);
74
+ const getMilliseconds = new Date().getUTCMilliseconds();
75
+ const randomStamp = getMilliseconds + Math.random() + Math.random();
76
// eslint-disable-next-line
- props.key = `Typist-element-${tag}-${Date.now() + Math.random() + Math.random()}`;
77
+ props.key = `Typist-element-${tag}-${randomStamp}`;
78
return React.createElement(tag, props, ...children);
79
}
80
0 commit comments