Closed aziz-boudi4 closed 7 years ago
I have a modal page popping up when the user clicks a button :
`render() { return ( <div> <section> <button onClick={() => this.refs.simpleDialog.show()}>Open Modal</button> </section> <SkyLight hideOnOverlayClicked ref="simpleDialog" title="Test Modal"> Text that appears inside the modal page <Button onClick={() => this.refs.simpleDialog.hide()} >Got It</Button> </SkyLight> </div> )} `
My goal is to open the modal automatically when the user opens the page for the first time.
I don't want to open the modal page by clicking on a button Question:
Can I use an IIFE (An immediately-invoked function expression) in order to open the modal as soon as the user open the page ?
My approach was to set a boolean to true. Then open the modal if the value is set to true
I have a modal page popping up when the user clicks a button :
My goal is to open the modal automatically when the user opens the page for the first time.
I don't want to open the modal page by clicking on a button Question:
Can I use an IIFE (An immediately-invoked function expression) in order to open the modal as soon as the user open the page ?
My approach was to set a boolean to true. Then open the modal if the value is set to true