You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try the official demo, add useEffect and try modify its dispose code:
typeProps={label: string;}constCounter=(props: Props)=>{const[count,setCount]=React.useState<number>(0)React.useEffect(()=>{// Modify this line cause crash:return()=>{aa}},[],)return(<div><h3style={{background: 'darkslateblue',color: 'white',padding: 8,borderRadius: 4}}>{props.label}: {count}🧮</h3><buttononClick={()=>setCount(c=>c+1)}>Increment</button></div>)}render(<Counterlabel="Counter"/>)
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Code of Conduct
Code Sandbox link
No response
Bug report
Try the official demo, add useEffect and try modify its dispose code:
The text was updated successfully, but these errors were encountered: