Steps to create React Application

Step 1: Create a React application with the following command:

npx create-react-app my-app

Step 2: Move to the project folder my-app with the following command:

cd my-app

How to write comments in ReactJS ?

To write comments in React JS we use the javascript comments and JSX object. It helps in adding useful information about the code and comment-out and ignore the extra code in the program.

Writing comments in React is done in these ways.

Table of Content

  • Using JavaScript comments
  • Using JSX object

Similar Reads

Steps to create React Application

Step 1: Create a React application with the following command:...

Project Structure

...

Approach 1: Using JavaScript comments

These comments are made in the function and class definitions or where we are not writing any JSX code....

Approach 2: Using JSX object

...

Contact Us