React | SoloLearn: Learn to code for FREE!

+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

4/2/2019 12:52:14 AM

oh Common

2 Answers

New Answer

+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.

+2

@dplusplus I know, I meant it doesn't work even if it's on a folder with the html and the .js file