conditional styling react with classname code example Example: conditional classname prop react <span className={todo.completed ? "true" : ""}>