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
It should click on the same place many times as you would on a browser, and multiple windows will be opened. However, it seems that this function is not supported at present. Or maybe there is something wrong with my usage?
The text was updated successfully, but these errors were encountered:
Hello, I was facing the same problem but I managed to sort myself out with the onUnload prop.
Example of a component that opens any number of windows onclick and retains their data.
constTestMultiple=()=>{const[windows,setWindows]=React.useState<null[]>([]);const[otherWindowInput,setInput]=React.useState('');return(<><p>Here's the input from another window</p><p>{otherWindowInput}</p><buttononClick={()=>setWindows((prev)=>[...prev,null])}>Click me to open a new window! Wowsers</button>{windows.map((_)=>(<NewWindowonUnload={()=>setWindows((prev)=>prev.slice(1))}><h1>WOW</h1><inputonChange={(e)=>setInput(e.target.value)}></input></NewWindow>))}</>);};
It should click on the same place many times as you would on a browser, and multiple windows will be opened. However, it seems that this function is not supported at present. Or maybe there is something wrong with my usage?
The text was updated successfully, but these errors were encountered: