add a className to div in react code example
Example 1: conditional style prop react
style={{ textDecoration: todo.completed && "line-through" }}
style={{ textDecoration: todo.completed ? "line-through" : 'none' }}
Example 2: dynsmic calss in react add
className={`box ${isBoxVisible ? "" : "hidden"}`}