Skip to content

feat: use clsx#508

Merged
SevereCloud merged 3 commits intomasterfrom
SevereCloud/feat/add-classnames
Jul 17, 2024
Merged

feat: use clsx#508
SevereCloud merged 3 commits intomasterfrom
SevereCloud/feat/add-classnames

Conversation

@SevereCloud
Copy link
Copy Markdown
Contributor

@SevereCloud SevereCloud commented Jul 16, 2024

Переэкспортируем функцию classNames из пакета clsx. По API они совпадают

Бенефиты пакета clsx :

  • пакет clsx работает быстрее чем в vkjs
  • более известный пакет, а значит будет меньше дублирования кода

Почему не classnames

Пакет classnames не тришейкается(обещают в следующей мажорной версии). clsx, в сравнении с classnames, немного быстрее и меньше по размеру

Переэкспортируем функцию classNames из пакета [classnames](https://npm.im/classnames). По API они совпадают

Бенефиты пакета classnames :
- пакет classnames работает быстрее чем в vkjs
- более известная функция, а значит будет меньше дублирования кода
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 16, 2024

size-limit report 📦

Path Size
JS 17.99 KB (+0.16% 🔺)
JS (gzip) 17.99 KB (+0.16% 🔺)
JS (brotli) 17.99 KB (+0.16% 🔺)
JS ES6 16.65 KB (-0.03% 🔽)
JS with querystring only import (no tree shaking) 18.08 KB (+0.49% 🔺)
JS ES6 with querystring only import (tree shaking) 543 B (0%)
JS with leadingZero only import (no tree shaking) 18.08 KB (+0.3% 🔺)
JS ES6 with leadingZero only import (tree shaking) 26 B (0%)
JS ES6 with decodeHTMLEntities only import (tree shaking) 444 B (0%)
JS ES6 with decodeHTMLFullEntities only import (tree shaking) 9.88 KB (0%)

@SevereCloud SevereCloud changed the title feat: add classnames feat: use clsx Jul 16, 2024
@SevereCloud SevereCloud marked this pull request as ready for review July 16, 2024 11:25
@SevereCloud SevereCloud self-assigned this Jul 16, 2024
Copy link
Copy Markdown
Contributor

@inomdzhon inomdzhon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💖

@SevereCloud SevereCloud merged commit d41d42c into master Jul 17, 2024
@SevereCloud SevereCloud deleted the SevereCloud/feat/add-classnames branch July 17, 2024 07:06
@SevereCloud SevereCloud added this to the v1.3.0 milestone Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants