- Issues
- #8
What's the difference with classcat
vladshcherbin opened 路
Hey,
What's the difference with [classcat](https://github.com/jorgebucaran/classcat) package? It was also released as a faster/smaller/esm ready version of `classnames` a year ago.
Why another package with same purpose? It even has a benchmark where `clsx` seems to be many times slower. 馃
Thanks
- LU
Hey, thanks!
Classcat only works with a single parameter, which is an array of your values. This means it is 100% not compatible with classnames usage.
Clsx is a complete drop-in replacement for classnames. And if you look at my benchmarks (which are classnames' benchmarks) you'll see that Array-values are the worst case scenario for clsx. So what you're seeing is my worst case pinned against classcat's only case.
Hope that clears things up :)
- VL
@lukeed thanks for explanation :)
lukeedmentioned7 years ago on GitHub
lukeedsubscribed7 years ago on GitHub