-
Notifications
You must be signed in to change notification settings - Fork 561
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
Preparing for version 3.0 #346
Comments
@dcousens @JedWatson WDYT? Is this strategy something you can get behind as well? |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sounds good to me, but I wouldn't bother with a |
Perfect, I've created a |
Let's keep this issue open to coordinate the work needed for 3.0 in general. |
I went ahead and deleted the |
Stupid idea maybe, but would it make sense to just say the next version of classnames is clsx? Or is there going to be some advantage of classnames v3 over clsx? Currently clsx claims to be faster and smaller, and it's also now more popular. |
I personally have been toying with the idea of simplifying the API of classnames to reduce the complexity of our code, and hopefully increase performance while we're at it. But this will still require some discussion on what the final implementation should be. I'd also like to offer an even more basic version of classnames that only accepts strings (much like clsx), as you can pretty much express all you need with Aside from that we offer style binding (e.g. for CSS modules), and a unique 'dedupe' alternative. We still have to decide what needs to be preserved from this, or revisited in API. I myself would like to refactor the style binding variant to have a more intuitive API, I think there is still value in that for our users. As for the 'dedupe' variant, I don't really see any practical cases where you would want to dedupe classes, or even run into a scenario where your expressions have become so complex it would occur naturally. Also the impact of having a class duplicated is virtually non-existent, but perhaps there are historical reasons for this.
I don't think this is a stupid idea at all, one of the many issues in the JavaScript ecosystem is the choice overload that persists. And we have a lot of overlap with clsx, so it does make a lot of sense to see if we can combine our efforts here. I think there are a couple of differences between our philosophies though (note personal opinion ahead), we both strive for excellent performance (note we are pretty competitive), but clsx obsesses a bit about file-size to the point where I think the returns are diminishing, we're only shipping a single utility function after all. Another point we differ is that clsx is backwards compatible all the way back to Node.js v0.10.0 and Internet Explorer 8. Which is impressive, but I sincerely doubt that it is being executed in any such runtime that still exists in the wild. I prefer more modern syntax support if that can open up the gates to better performance (e.g. using We also have plans to possibly drop UMD and CommonJS and favor a purely ESM distribution (#349), as I believe there is a lot of value in finally settling on a common set of primitives around modules. Note, we will continue to support v2 for the foreseeable future to bridge that gap. That said, perhaps our differences can be settled, APIs combined, and we can make a better alternative to all involved. For now at least work will continue on classnames, and we're actively looking to the future, whatever that may be. |
With all the outstanding issues resolved except those that might introduce breaking changes, I think it's time to we start branching off for version 3, and consider what changes should be included. There is already a
next
branch, but it has become rather stale, and most of the code has already been ported back tomain
.My proposal would be to delete the
next
branch, and instead create av2
branch that takes the current state ofmain
, so we can continue to maintain and release 2.x in the future (although this would likely only include critical bug and security fixes). We can then use themain
branch to further develop version 3.0 until it is deemed ready for release.I've also created a milestone for version 3.0, which should make it a bit easier to track.
The text was updated successfully, but these errors were encountered: