Do not get me wrong, the classnames package is really handy. It is also quite popular with just over 3.5 million downloads per week as of the date of this blog post. Most React based projects I have worked on use it.
If you are not familiar with the classnames package, it allows you to build a set of CSS classes based on some conditionals. Straight from there documentation:
Note: true and false are used to simplify the example, but normally these would be conditional variables, methods or functions.
If you are not familiar with template strings, you can build a string with variables mixed in. Let us look at the previous examples, but this time with template strings.