Menu

Rendering the UnitConverter Component

Rendering the UnitConverter Component

In this lesson, the App component serves as the main entry point for the React application. It imports the UnitConverter component and renders it inside the return block.

When <UnitConverter /> is placed in App, the full converter UI appears on the screen. This keeps the structure simple, with the App handling rendering and the UnitConverter handling all the main logic and features.

File Path: UnitConverter\src\App.jsx

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


function App() {


  return (
    <>


      <UnitConverter />


    </>
  )
}


export default App