Improve performance when rendering many emoji

This commit is contained in:
Evan Hahn 2021-08-30 11:39:03 -05:00 committed by GitHub
parent 6f242eca57
commit 7f50fcdb54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 17 deletions

View file

@ -96,3 +96,19 @@ story.add('Custom Text Render', () => {
return <Emojify {...props} />;
});
story.add('Tens of thousands of emoji', () => {
const props = createProps({
text: '💅'.repeat(40000),
});
return <Emojify {...props} />;
});
story.add('Tens of thousands of emoji, interspersed with text', () => {
const props = createProps({
text: '💅 hi '.repeat(40000),
});
return <Emojify {...props} />;
});