Menu

Rendering the ExpenseTracker Component inside the Parent App

Rendering the ExpenseTracker Component inside the Parent App

In this lesson, the ExpenseTracker component is imported and displayed inside the App component.

The App component acts as the parent component, while ExpenseTracker is the child component. This approach helps keep the project organized by separating the expense-tracking functionality from the main application component.

File Path: ExpenseTracker\src\App.jsx

import { useState } from 'react'
import './App.css'
import ExpenseTracker from './components/expenseTracker'


function App() {




  return (
    <>
      <div className="main-wrapper flex flex-col items-center w-full min-h-screen px-4 md:px-8 py-8">


        <ExpenseTracker />


      </div>


    </>
  )
}


export default App