import { useState } from 'react' const Button = (props) => { return ( ) } const StatisticLine = (props) => { return ( {props.text}{props.count} ) } const Statistics = (props) => { const good = props.good const bad = props.bad const neutral = props.neutral if (good === 0 && bad === 0 && neutral === 0) { return

No feedback given

} const total = good + neutral + bad const average = (good - bad) / 9.0 const positive_percent = (good/total) * 100 return (
) } const App = () => { // save clicks of each button to its own state const [good, setGood] = useState(0) const [neutral, setNeutral] = useState(0) const [bad, setBad] = useState(0) return (

give feedback

) } export default App