Joyeeta Nandi's Blog

Joyeeta Nandi's Blog

Create React Element

Joyeeta Nandi's photo
Joyeeta Nandi
·Apr 9, 2021·

1 min read

index.js

 import React from "react";
 import ReactDOM from "react-dom";
 import "./index.css";
 ReactDOM.render(
       React.createElement(
              "h1",
               { style: { color: "green" } },
                "Welcome to the React World"
                   ),
         document.getElementById("root")
       );

image.png

 
Share this