calling classs inside class

 import React from 'react';

import ReactDOM from 'react-dom/client';

function Car() {
  return <h2>I am a Car!</h2>;
}

function Garage() {
  return (
    <>
	    <h1>Who lives in my Garage?</h1>
	    <Car />
    </>
  );
}

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<Garage />);

No comments:

Post a Comment

How to host application on server new way

 copy the htacess from public to root copy the server.php from public to root but rename to index.php htacess <IfModule mod_rewrite.c>...