I agree it is hard to read, but classes remains an array here.

What changes is that in case you passed "classA classB", it splits it in ['classA', 'classB'] and concats with classes. What would be more straightforward here, would be to change the type of className to be an array. We should then change the name of the property as well, because for className relates to the DOM Element's property className, which is a string (and might contain spaces to separate classes).

But yes I did this in a hurry in order to be able to pass several classes.