Nested Component

NESTED COMPONENT ..

				
					import React from "react";
import "./index.css";

const App = () => {
  return (
    <>
      <Child1 />
      <Child2 />
    </>
  );
};

const Child1 = () => {
  return <div>first child1</div>;
};

const Child2 = () => {
  return <div>second child2</div>;
};

export default App;

				
			

first child1

second child2

Leave a Comment