({label})
| 500 | const {useState, useEffect} = React; |
| 501 | |
| 502 | function App({label}) { |
| 503 | const [step, setStep] = useState(0); |
| 504 | useEffect(() => { |
| 505 | if (step < 3) { |
| 506 | setStep(step + 1); |
| 507 | } |
| 508 | }, [step]); |
| 509 | |
| 510 | // The component should keep re-rendering itself until `step` is 3. |
| 511 | return step === 3 ? 'Finished' : 'Unresolved'; |
| 512 | } |
| 513 | |
| 514 | const containerA = document.createElement('div'); |
| 515 | const containerB = document.createElement('div'); |