Open In App

How to write ReactJS Code in Codepen.IO ?

Improve
Improve
Like Article
Like
Save
Share
Report

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 with an online platform to create react, HTML, CSS, and 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’s projects and code, it becomes better ways to learn a project. 

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


Last Updated : 27 Apr, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads