This example simulates a weather app interface.
jsxCopy codeimport React from 'react';
import ReactDOM from 'react-dom';
function WeatherApp() {
const weatherData = {
location: 'New York',
temperature: '22°C',
condition: 'Sunny',
};
return (
<div>
<h1>Weather App</h1>
<h2>{weatherData.location}</h2>
<p>{weatherData.temperature}</p>
<p>{weatherData.condition}</p>
</div>
);
}
ReactDOM.render(<WeatherApp />, document.getElementById('root'));
Leave a Reply