Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: improve how we build classNames #196

Merged
merged 9 commits into from
Feb 26, 2024

Conversation

helciofranco
Copy link
Member

@helciofranco helciofranco commented Feb 26, 2024

We've been running twMerge and clsx on every re-render, it led to some kind of performance issue.
So this PR is replacing twMerge with a simple clsx and also running it ONLY when it is really necessary.

With these changes, we can get a great performance on rendering.

⚠️ Before 🚀 After
Screenshot 2024-02-26 at 14 58 56 Screenshot 2024-02-26 at 14 59 42

Reference: prefer twJoin over twMerge

@helciofranco helciofranco linked an issue Feb 26, 2024 that may be closed by this pull request
@helciofranco helciofranco merged commit ba9bf14 into lf/feat/migrate-fuel-ui Feb 26, 2024
6 checks passed
@helciofranco helciofranco deleted the hf/fix/create-component branch February 26, 2024 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

createComponent performance issues
2 participants