I wonder if the state parameter is really needed. Can't we just hide the "status" element when the message is null/empty?