My question is divided into two parts:
I know how to do ajax request to third party api on componentDidMount but when i tried doing same request with a function on a click event it did not happen?
I also tried to use <br>
tag in react to break a line but it does not render at a all and gives me error.
Can anyone please help me to understand why this is happening and how can i resolve these issues?
This should work. Please post a working example (e.g., on jsfiddle) that shows how you're having trouble.
Try <br />
. All self-closing tags must have the final slash in React.
(In the future, best to post as separate questions.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With