I’m working through the Random Quote Machine project and I have it at a point where it sometimes passes all the tests, and sometimes it doesn’t. I attempted to create the project using a combination of React and Bootstrap, since I wanted to gain more practical experience using both.
Right now, I only have three quotes loaded into a variable - array containing three objects. The tests that most often get caught are #8 and #9 - “when the #new-quote button is clicked, my quote machine should fetch a new quote/ author and display it in the #text/ #author element.” Also worth noting is that sometimes the tests run quick, while others it seems to churn for a bit.
I’m not sure if this is because of how I’m using React, the efficiency of my newQuote() function, or something else entirely. Any help and/ or feedback is greatly appreciated.
Once I get consistent passes, my next step will be to use a JSON file to pull from a larger quote pool.
My codepen is here: https://codepen.io/bloo0178/pen/YOKYNj