Escapehtml phản ứng
It says clearly that by default React DOM escapes any values embedded in JSX unless it is explicitly written in code. So what that basically mean is if we try to render user input(this could be response data) it will be escaped(an escape is a fancy word for remove or replace). But as i understood this will not escape elements such as new lines(new line is technically not a tag which brings us to another topic Show // 1: Note - This will NOT create a new line since it is escaped and // tag Nhưng bạn có thể xử lý các loại ký tự dòng mới này bằng cách sử dụng thuộc tính css trên phần tử nhắm mục tiêu white-space: pre-line; There may be instances where we may need to set HTML strings in React. An example would be your app receives a string in a response where the data is a HTML formatted string and we want to render it according to that structure.(this could be some CMS sending an input of a text area where , , " |