React | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

React

So, this code should print hey on the screen and it does. But it only works if I put it directly on the script, if put the name of the file on the src property it doesn't work. Try it on a computer, doesn't work in the code playground! https://code.sololearn.com/WXHZNbPp2vz8/?ref=app

2nd Apr 2019, 12:52 AM
oh Common
oh Common - avatar
2 Answers
+ 3
Well, how do you think sololearn servers can read a file that is in your computer? It needs to be uploaded somewhere on the web, just paste the link.
2nd Apr 2019, 4:28 AM
dρlυѕρlυѕ
dρlυѕρlυѕ - avatar
+ 2
@dplusplus I know, I meant it doesn't work even if it's on a folder with the html and the .js file
2nd Apr 2019, 9:24 AM
oh Common
oh Common - avatar