how to add a class dynamically in react code example Example: dynsmic calss in react add className={`box ${isBoxVisible ? "" : "hidden"}`}