SOLVED: Issue: Quote Machine using React. Custom Fetch method not working in codepen

SOLVED: Issue: Quote Machine using React. Custom Fetch method not working in codepen
0

#1

I’m having issue with my this.fetchQuote method not invoking after the first initial click.

Funny thing is if I have my Chrome Devtools console open, the fetch works as intended. The moment that I close the chrome console, the fetch breaks, and fetches the exact same quote.

Here is my codepen for reference: CodePen


#2

Checked out the forum and found that my browser was caching my result. I put this line at the end of my fetch method and it worked as intended.

$.ajaxSetup({ cache: false })