React blog-01

Hello Engineers, As promised earlier here we are with our first blog of react series, In this we will see how to start with react for beginners. To create your first React program, you'll need to follow these steps: Setup Node.js and npm: Ensure you have Node.js and npm (Node Package Manager) installed on your machine. You can download and install them from nodejs.org.

  1. Create a new React app: Open your terminal and run the following command to create a new React app using Create React App (CRA):

  2.  npx create-react-app my-first-react-app
    

    Replace my-first-react-app with the desired name for your project.

  3. Navigate to your project: Change to the newly created project directory:

cd my-first-react-app
  1. Run the app: Start the development server by running:

     npm start
    

    This will open a new browser window/tab with your React app running. By default, it should be available at http://localhost:3000/.

    1. Explore and make changes: Open the src/App.js file in your code editor. You can make changes to the default React component and see them instantly reflected in your browser as you save the file.

Here's a simple example of the default src/App.js file:

    import React from 'react';
    import './App.css';

    function App() {
      return (
        <div className="App">
          <header className="App-header">
            <h1>Hello, world this is my first ract project</h1>
          </header>
        </div>
      );
    }