← React Intermediate Questions - Set 5 Q50
React Intermediate Questions - Set 5
1 2
function A() { const [n] = useState(0); return <p>{n}</p>; } class B extends Component { state = { n: 0 }; render() { return <p>{this.state.n}</p>; } }