Classnames Computed Keys
Here's some fun code:
Notice the object inside className
– what's going on here?
This is a dynamic class name via ES2015+ computed keys. If appClass
is provided as a truthy prop, the class is enabled; if it is not provided or provided as a falsy prop, the class is not enabled.