Skip to content

Instantly share code, notes, and snippets.

Created Jan 12, 2020
What would you like to do?
Parent Application that takes weather component basic data and counter click
import React,{useState} from 'react';
import Weather from './Weather'
import './App.css';
function App() {
const [counter, setCounter] = useState(0)
const [weather] = useState({city:'Miami', temperature:'80F'})
return (
<div className="App">
<Weather weather={weather} />
<button onClick={()=>setCounter(counter + 1)}>Increment</button>
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment