A simple JavaScript utility for conditionally joining classNames together (using on classnames), but avoiding collisions on tailwind utilities. The right-most utility takes precedence over previous of the same property (eg.: border my-1 m-2
-> border m-1
). This utility was inspired this tweet and it's under discussion on this thread
Here's a good example, given a component such as:
const SomeComponent = ({ className }) =>