samedi 20 février 2021

how to do a button who open a popup

i know that is a "newbie" question but i m totaly new in web dev and i have project in react js.

I try to do a button who open a mini window.


  const redirecttest = () =>{
    <Popout url='popout.html' title='Window title' onClosing={this.popupClosed}>
      <div>test</div>
    </Popout>
  }
  console.log(mail);
  return (
    
      <div className="App-header">
        <button type='button' onClick={()=>{redirecttest()}}>Create an area</button>

i tried that but my web navigator doesnt like it and say this:

TypeError: undefined has no properties


  66 | const redirecttest = () =>{
> 67 |   <Popout url='popout.html' title='Window title' onClosing={this.popupClosed}>
     | ^  68 | 
  69 |   </Popout>
  70 | }


can someone help me please :)



Aucun commentaire:

Enregistrer un commentaire