!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="theme-color" content="#000000" /> <title>React App</title> </head> <body> <noscript>You need to enable JavaScript to run this app.</noscript> <div id="root"></div> </body> </html>
import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( <React.StrictMode> <App /> </React.StrictMode> );
import { useState } from 'react'; import './App.css'; function App() { return ( <div class="container"> <div class="row"> <div align="center"> <h1>React Js with Calculate Two Numbers</h1><br/> <input type="number" class="in1" placeholder='Enter Number' /><br/><br/> <input type="number" class="in2" placeholder='Enter Number' /><br/><br/><br/> </div> </div> </div> ); } export default App;