Working on a challenge: help needed

That means you didn’t import the library, but 5 minutes ago when I clicked the link, it was working.

i also changed cdn with a link i took from another working pen

it works now -.-
but (a part from the .p instead of p, i had previousoly tried with the id selector # and i had those problems )
well, thank you so far…
but i foresee other troubles so, please, stay tuned ^-^

1 Like

sorry for bothering you again
i eventually managed to complete the project and then i tried to make another one using an API (and Axios).
I worked ok on Atom so i copied the code and imported the CDN for axios but i am getting a strange error when i run everything.
that is, JS says that the newQuote is not defined, but I defined it and i can log it jus before the error… can you help me solving the problem, please?

https://codepen.io/ranran212/pen/BaWNybr?editors=1111

Hi, I checked your code and made it work for myself, the problem is the order of the code execution, you have to be sure to execute the code after you download and assign the data.

So I suggest you to make assignments and every other thing inside the Axios function.

I like the design btw, but you should improve it!

done :slight_smile:
i put everything into Axion, as you suggested
Actually, i do not know Axios at all: i just watched an explanation about how to make a get request and how to check the structure of answer object and found it much more understandable than JS ajax, redux and all the other stuff
Actually I am a bit discouraged because all these frameworks/libraries just confuse me a lot.
I am still tring to understand React and with redux I am at loss…i mean, i understand the logic of React ( and not completely Redux) but when I have to use them I have black outs :’(

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.