I know JSX can be very misleading because it looks like strings and it is not, thus the \"string\" term in the question, even if we are not really manipulating strings.
If you are okay using a parent object such as another div you can also do it this way:
let line = ; if(line.created_at) { return {line.created_at}{line}; } else { return chat_line; }