Random quote machine - any ideas how to make this work?

Tell us what’s happening:

I have built a random quote machine, which was no easy feat in itself. I’ve learnt about the fetch API on my own to be able to use the external quotes source. Now I have a very basic quote machine backbone, but it does not seem to render to the page. I am a bit puzzled as to why it is happening as it is not passing any tests. Please don’t mind the absence of design as I wanted to take care last, I am very keen to understand the functional component first.

Your code so far
Please check my codepen https://codepen.io/Karajna/pen/QWEXaxW

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36.

Challenge: Build a Random Quote Machine

Link to the challenge:

you do not have an element with id of root

thank you very much @ILM, I have indeed forgotten to add it to the HTML, but now I did and nothing has changed… :frowning:

import react from 'https://cdn.skypack.dev/react@17.0.1';
import reactDom from 'https://cdn.skypack.dev/react-dom@17.0.1';

When working in codepen you have to add your dependencies in JavaScript settings:

Then you don’t have to import React or anything. It’s automatically available. So after you add react and react-dom you’ll have to fix one small error with handleChange and it should render. It did render for me at least :smiley:

thanks a lot @sitek94 I have done as you recommended (added dependencies in JS).
Then I took a good look at the handleChange… and could find nothing. I am not sure what’s wrong with is? Thanks in advance!

When you open dev tools the error says that handleChange is not defined at line 9.

It’s this line of code:

this.handleChange = handleChange.bind(this)

I hope it’ll help you :wink:

OMG… thank you sooo much! I did not know such thing as dev tools existed… I will spend the next few hrs figuring it out :grinning:

No need to spend few hours on them :smiley: Just start using them and you’ll get more comfortable with time. It’s very powerful tool, I have it open literally all the time.