Skip to content

expose a parseClassList function derived from the existing mergeClassList function #373

Answered by dcastil
Rinaldo asked this question in Ideas
Discussion options

You must be logged in to vote

Hey @Rinaldo! 👋

I have two different answers to your message. Here are both:

Answer to your feature request

I also thought about it from time to time that it would be useful to expose the low level class info and let people do more custom stuff with it. The challenge lies in how to expose that functionality.

Some boundaries I can think of:

  • The API should not introduce breaking changes
  • It should reuse the config computed in createTailwindMerge to preserve memory and CPU cycles. Because the config only exists within that function, the API also needs to be exposed from within that function.
  • How to make sure that exposing the API won't stall development and usage of tailwind-merge? E.g. when…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Rinaldo
Comment options

@dcastil
Comment options

Answer selected by Rinaldo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
feature request context-v2 Related to tailwind-merge v2
2 participants