My question is divided into two parts:
I know how to make an ajax request to a third-party api on componentDidMount, but when I tried to make the same request with a function in the click event, this did not happen?
I also tried using the <br> tag to respond to line breaks, but it does not display at all and does not give me an error.
Can anyone help me understand why this is happening and how can I solve these problems?
source share