ReactJS beginner problem | Sololearn: Learn to code for FREE!


ReactJS beginner problem

I have recently started learning reactjs and I got a problem with this code I tried it on Codepen and the console didn't show anything and there wasn't any output(of course I used Codepen reactjs setup)

6/10/2020 8:01:12 AM


4 Answers

New Answer


WARLORD Idk what is wrong on codepen since you did now show me any link to your codepen code. But I looked into your code and found bunch of mistakes which I fixed here(look in comments, I added what mistakes you did):


If you want to use React.js on playground then you need to link cdn to react and other libraries. NOTE: you can remove SCSS compiler and cdn if you're not using it.


šŸ”« Rick Grimes I tried the arrow functions with () around the arguments and it worked when I tried the second time because when tried that on the second time the function worked but not the array Thanks for helping me, and here's a "best answer" have a nice day :)


šŸ”« Rick Grimes thanks but as I mentioned in the question I used Codepen ReactJS editor and neither console and output windows showed anything