How to write ReactJS Code in Codepen.IO ?

Now everything is online, some people use VScode to write react.js code and face most of the difficulty. The VScode requires setting for writing React.js code and Many beginners faced difficulty to use VScode so, for them, it is good and easy to use codepen. The codepen provide you an online platform to create react, HTML, CSS, JavaScript project. Codepen also has another advantage that you will easily upload your code to GitHub and share your code with anybody without any difficulty. Codepen also has one more advantage that you will see other people project and code, it becomes better ways to learn a project.
02
How to adjust and start using Codepen:

  • Step 1: First visit the codepen official site.
  • Step 2: Now you have to create an account in codepen.io, you can signup through Facebook, Twitter, GitHub or by using Email.
  • Step 3: Then Click on your Profile on the top right corner of your window and visit the New Pen.
  • Step 4: Now go to setting and click on js. Select Babel as javascript preprocessor, type in the search bar for React to import React and React-dom fro React-dom CDNjs and then save and close.

Now write JavaScript, HTML, and CSS code in its corresponding block. Click on the Save button after you have written the code, now if your code has no error then it will run and show output successfully.

react-js-img

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.