-------- Heading.jsx page ------------- import React from "react"; import ReactDOM from "react-dom"; function Heading(){ return <h1>This is My Componente Heading</h1> } export default Heading; --------- main page ---------- import ReactDOM from "react-dom"; import Heading from "./Heading.jsx"; // is optional the .jsx import Ulist from "./Ulist"; ReactDOM.render( <div> <Heading /> <Ulist /> </div>, document.getElementById("root") );
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter