If in and appear are true on first render, and classNames contains a value for enterDone and you do not provide appearDone, you get an undefined class.
Having appear set in classNames does not prevent undefined from being included. If you have enterDone and do not include appearDone, you get undefined.
What is the expected behavior?
Do not inject "undefined" class names (in any situation, not just this one).
Could you provide a CodeSandbox demo reproducing the bug?
If
in
andappear
aretrue
on first render, andclassNames
contains a value forenterDone
and you do not provideappearDone
, you get anundefined
class.Having
appear
set inclassNames
does not preventundefined
from being included. If you haveenterDone
and do not includeappearDone
, you getundefined
.Do not inject "undefined" class names (in any situation, not just this one).
https://codesandbox.io/s/blazing-tdd-dlmmk3?file=/src/App.js
I made a css class which turns text red so you can see visually when
undefined
is being included.